Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple LINKED_LIBS (for Wasm extension builds) #84

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
else()
if(APPLE AND CMAKE_SYSTEM_PROCESSOR MATCHES "arm64")
if("${CMAKE_CXX_COMPILER_VERSION}" VERSION_GREATER 14.0)
message(

Check warning on line 181 in CMakeLists.txt

View workflow job for this annotation

GitHub Actions / OSX Extensions Release (x86_64)

Not disabling vptr sanitizer on M1 Macbook - set DISABLE_VPTR_SANITIZER

Check warning on line 181 in CMakeLists.txt

View workflow job for this annotation

GitHub Actions / OSX Extensions Release (x86_64)

Not disabling vptr sanitizer on M1 Macbook - set DISABLE_VPTR_SANITIZER

Check warning on line 181 in CMakeLists.txt

View workflow job for this annotation

GitHub Actions / OSX Extensions Release (arm64)

Not disabling vptr sanitizer on M1 Macbook - set DISABLE_VPTR_SANITIZER

Check warning on line 181 in CMakeLists.txt

View workflow job for this annotation

GitHub Actions / OSX Extensions Release (arm64)

Not disabling vptr sanitizer on M1 Macbook - set DISABLE_VPTR_SANITIZER

Check warning on line 181 in CMakeLists.txt

View workflow job for this annotation

GitHub Actions / OSX Extensions Release (arm64)

Not disabling vptr sanitizer on M1 Macbook - set DISABLE_VPTR_SANITIZER
WARNING
"Not disabling vptr sanitizer on M1 Macbook - set DISABLE_VPTR_SANITIZER manually if you run into issues with false positives in the sanitizer"
)
Expand All @@ -203,7 +203,7 @@
endif()
else()
set(CXX_EXTRA_DEBUG "${CXX_EXTRA_DEBUG} -fsanitize=undefined -fno-sanitize-recover=all")
if (${DISABLE_VPTR_SANITIZER})

Check warning on line 206 in CMakeLists.txt

View workflow job for this annotation

GitHub Actions / R Package Windows (Extensions)

TIFF support is not enabled and will result in the inability to read some

Check warning on line 206 in CMakeLists.txt

View workflow job for this annotation

GitHub Actions / Linux Extensions (linux_amd64_gcc4)

TIFF support is not enabled and will result in the inability to read some

Check warning on line 206 in CMakeLists.txt

View workflow job for this annotation

GitHub Actions / Linux Extensions (linux_amd64_gcc4)

TIFF support is not enabled and will result in the inability to read some

Check warning on line 206 in CMakeLists.txt

View workflow job for this annotation

GitHub Actions / Windows Extensions (64-bit)

TIFF support is not enabled and will result in the inability to read some

Check warning on line 206 in CMakeLists.txt

View workflow job for this annotation

GitHub Actions / Windows Extensions (64-bit)

TIFF support is not enabled and will result in the inability to read some
set(CXX_EXTRA_DEBUG "${CXX_EXTRA_DEBUG} -fno-sanitize=vptr")
endif()
endif()
Expand Down Expand Up @@ -575,7 +575,7 @@
AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 9.0)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${CXX_EXTRA_DEBUG}")
else()
message(WARNING "Please use a recent compiler for debug builds")

Check warning on line 578 in CMakeLists.txt

View workflow job for this annotation

GitHub Actions / Linux Extensions (x64)

Please use a recent compiler for debug builds

Check warning on line 578 in CMakeLists.txt

View workflow job for this annotation

GitHub Actions / Linux Extensions (x64)

Please use a recent compiler for debug builds

Check warning on line 578 in CMakeLists.txt

View workflow job for this annotation

GitHub Actions / Linux Extensions (x64)

Please use a recent compiler for debug builds

Check warning on line 578 in CMakeLists.txt

View workflow job for this annotation

GitHub Actions / Linux Extensions (x64)

Please use a recent compiler for debug builds
endif()
else()
set(CMAKE_CXX_WINDOWS_FLAGS
Expand Down Expand Up @@ -894,7 +894,6 @@
if(EMSCRIPTEN)
# Compile the library into the actual wasm file
string(TOUPPER ${NAME} EXTENSION_NAME_UPPERCASE)
string(REPLACE ";" " " TO_BE_LINKED "${DUCKDB_EXTENSION_${EXTENSION_NAME_UPPERCASE}_LINKED_LIBS}")
if (${ABI_TYPE} STREQUAL "CPP")
set(EXPORTED_FUNCTIONS "_${NAME}_init,_${NAME}_version")
elseif (${ABI_TYPE} STREQUAL "C_STRUCT")
Expand All @@ -903,7 +902,7 @@
add_custom_command(
TARGET ${TARGET_NAME}
POST_BUILD
COMMAND emcc $<TARGET_FILE:${TARGET_NAME}> -o $<TARGET_FILE:${TARGET_NAME}>.wasm -O3 -sSIDE_MODULE=2 -sEXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS}" ${WASM_THREAD_FLAGS} ${TO_BE_LINKED}
COMMAND emcc $<TARGET_FILE:${TARGET_NAME}> -o $<TARGET_FILE:${TARGET_NAME}>.wasm -O3 -sSIDE_MODULE=2 -sEXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS}" ${WASM_THREAD_FLAGS} ${DUCKDB_EXTENSION_${EXTENSION_NAME_UPPERCASE}_LINKED_LIBS}
)
endif()

Expand Down Expand Up @@ -1097,8 +1096,8 @@
function(duckdb_extension_load NAME)
# Parameter parsing
set(options DONT_LINK DONT_BUILD LOAD_TESTS APPLY_PATCHES)
set(oneValueArgs SOURCE_DIR INCLUDE_DIR TEST_DIR GIT_URL GIT_TAG SUBMODULES EXTENSION_VERSION LINKED_LIBS)
cmake_parse_arguments(duckdb_extension_load "${options}" "${oneValueArgs}" "" ${ARGN})
set(oneValueArgs SOURCE_DIR INCLUDE_DIR TEST_DIR GIT_URL GIT_TAG SUBMODULES EXTENSION_VERSION)
cmake_parse_arguments(duckdb_extension_load "${options}" "${oneValueArgs}" "LINKED_LIBS" ${ARGN})

string(TOLOWER ${NAME} EXTENSION_NAME_LOWERCASE)
string(TOUPPER ${NAME} EXTENSION_NAME_UPPERCASE)
Expand Down
Loading