Skip to content

Commit eebb7a8

Browse files
Pass the right flag for WASM exception handling
1 parent 16f90d9 commit eebb7a8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cpp/cmake_modules/SetupCxxFlags.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -798,18 +798,18 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
798798
# flags are:
799799
# 1) We force *everything* to build as position independent
800800
# 2) And with support for C++ exceptions
801-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -fexceptions")
801+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -fwasm-exceptions")
802802
# deprecated-literal-operator error is thrown in datetime (vendored lib in arrow)
803803
set(CMAKE_CXX_FLAGS
804-
"${CMAKE_CXX_FLAGS} -fPIC -fexceptions -Wno-error=deprecated-literal-operator")
804+
"${CMAKE_CXX_FLAGS} -fPIC -fwasm-exceptions -Wno-error=deprecated-literal-operator")
805805

806806
# flags for creating shared libraries (only used in pyarrow, because
807807
# Emscripten builds libarrow as static)
808808
# flags are:
809809
# 1) Tell it to use JavaScript / WebAssembly 64 bit number support.
810-
# 2) Tell it to build with support for C++ exceptions
810+
# 2) Tell it to build with support for WASM exceptions
811811
# 3) Skip linker flags error which happens with -soname parameter
812-
set(ARROW_EMSCRIPTEN_LINKER_FLAGS "-sWASM_BIGINT=1 -fexceptions -Wno-error=linkflags")
812+
set(ARROW_EMSCRIPTEN_LINKER_FLAGS "-sWASM_BIGINT=1 -fwasm-exceptions -Wno-error=linkflags")
813813
set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS
814814
"-sSIDE_MODULE=1 ${ARROW_EMSCRIPTEN_LINKER_FLAGS}")
815815
set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS

0 commit comments

Comments
 (0)