Skip to content

Commit

Permalink
Merge branch 'main' into v0.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxxen committed Feb 26, 2024
2 parents 050d26a + 3d9cea0 commit 09e8781
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ VCPKG_EMSDK_FLAGS=-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$(EMSDK)/upstream/emscripten/
WASM_COMPILE_TIME_COMMON_FLAGS=-DWASM_LOADABLE_EXTENSIONS=1 -DBUILD_EXTENSIONS_ONLY=1 -DSKIP_EXTENSIONS="parquet;json" $(VCPKG_EMSDK_FLAGS) -DDUCKDB_EXPLICIT_PLATFORM='${DUCKDB_PLATFORM}'
WASM_CXX_MVP_FLAGS=
WASM_CXX_EH_FLAGS=$(WASM_CXX_MVP_FLAGS) -fwasm-exceptions -DWEBDB_FAST_EXCEPTIONS=1
WASM_CXX_THREADS_FLAGS=$(WASM_COMPILE_TIME_EH_FLAGS) -DWITH_WASM_THREADS=1 -DWITH_WASM_SIMD=1 -DWITH_WASM_BULK_MEMORY=1
WASM_CXX_THREADS_FLAGS=$(WASM_COMPILE_TIME_EH_FLAGS) -DWITH_WASM_THREADS=1 -DWITH_WASM_SIMD=1 -DWITH_WASM_BULK_MEMORY=1 -DUSE_PTHREADS=1 -pthread
WASM_LINK_TIME_FLAGS=-O3 -sSIDE_MODULE=2 -sEXPORTED_FUNCTIONS="_${EXT_NAME}_version,_${EXT_NAME}_init" ../../deps/local/lib/*.a

wasm_mvp:
Expand All @@ -174,6 +174,6 @@ wasm_eh:

wasm_threads:
mkdir -p ./build/wasm_threads
emcmake cmake $(GENERATOR) $(EXTENSION_FLAGS) $(WASM_COMPILE_TIME_COMMON_FLAGS) -Bbuild/wasm_threads -DCMAKE_CXX_FLAGS="$(WASM_CXX_THREADS_FLAGS) -DDUCKDB_CUSTOM_PLATFORM=wasm_threads" -S duckdb
emcmake cmake $(GENERATOR) $(EXTENSION_FLAGS) $(WASM_COMPILE_TIME_COMMON_FLAGS) -Bbuild/wasm_threads -DCMAKE_CXX_FLAGS="$(WASM_CXX_THREADS_FLAGS) -DDUCKDB_CUSTOM_PLATFORM=wasm_threads" -DCMAKE_C_FLAGS="-pthread" -S duckdb
emmake make -j8 -Cbuild/wasm_threads
cd build/wasm_threads/extension/${EXT_NAME} && emcc $f -o ../../${EXT_NAME}.duckdb_extension.wasm ${EXT_NAME}.duckdb_extension.wasm.lib $(WASM_LINK_TIME_FLAGS)
cd build/wasm_threads/extension/${EXT_NAME} && emcc $f -o ../../${EXT_NAME}.duckdb_extension.wasm ${EXT_NAME}.duckdb_extension.wasm.lib $(WASM_LINK_TIME_FLAGS) -sSHARED_MEMORY=1 -pthread
4 changes: 3 additions & 1 deletion deps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ set(CMAKE_PROJ_FLAGS )
set(CMAKE_GDAL_FLAGS )
set(PATCH_NAME_ENDING )
if (EMSCRIPTEN)
set(CMAKE_FLAGS_POINTER_SIZE -DCMAKE_SIZEOF_VOID_P=4 -DCMAKE_SIZEOF_VOIDP=4)
set(CMAKE_FLAGS_POINTER_SIZE -DCMAKE_SIZEOF_VOID_P=4 -DCMAKE_SIZEOF_VOIDP=4 -DCMAKE_C_FLAGS=-pthread -DCMAKE_CXX_FLAGS=-pthread)
set(CMAKE_PROJ_FLAGS -DCMAKE_MODULE_PATH=${LOCAL_INSTALL_DIR}/lib/cmake -DSQLITE3_INCLUDE_DIR=${LOCAL_INSTALL_DIR}/include -DSQLITE3_LIBRARY=${LOCAL_INSTALL_DIR}/lib/libsqlite3.a)
set(CMAKE_GDAL_FLAGS -DACCEPT_MISSING_LINUX_FS_HEADER=ON -DSIZEOF_INT=4 -DSIZEOF_UNSIGNED_LONG=4 -DSIZEOF_OFF_T=4 -DGEOS_DIR=${LOCAL_INSTALL_DIR}/lib/cmake/geos -DGeographicLib_DIR=${LOCAL_INSTALL_DIR}/lib/cmake/GeographicLib -DSQLITE3_LIBRARY=${LOCAL_INSTALL_DIR}/lib/libsqlite3.a)
set(PATCH_NAME_ENDING _wasm)
Expand Down Expand Up @@ -154,6 +154,7 @@ ExternalProject_Add(
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES_PACKED}
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
${CMAKE_FLAGS_POINTER_SIZE}
# vcpkg options
-DVCPKG_MANIFEST_DIR='${VCPKG_MANIFEST_DIR}'
-DVCPKG_INSTALLED_DIR='${VCPKG_INSTALLED_DIR}'
Expand Down Expand Up @@ -208,6 +209,7 @@ ExternalProject_Add(
-DCMAKE_PREFIX_PATH=${LOCAL_INSTALL_DIR}
-DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES_PACKED}
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
${CMAKE_FLAGS_POINTER_SIZE}
# vcpkg options
-DVCPKG_MANIFEST_DIR='${VCPKG_MANIFEST_DIR}'
-DVCPKG_INSTALLED_DIR='${VCPKG_INSTALLED_DIR}'
Expand Down

0 comments on commit 09e8781

Please sign in to comment.