diff --git a/docker/Dockerfile b/docker/Dockerfile index 15658ee..e14b250 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -48,5 +48,5 @@ ENV AR llvm-ar-${LLVM_VERSION} ENV RANLIB llvm-ranlib-${LLVM_VERSION} ENV CFLAGS --target=wasm32-wasi --sysroot=/wasi-sysroot -ENV CXXFLAGS --target=wasm32-wasi --sysroot=/wasi-sysroot +ENV CXXFLAGS --target=wasm32-wasi --sysroot=/wasi-sysroot -fno-exceptions ENV LDFLAGS --target=wasm32-wasi --sysroot=/wasi-sysroot diff --git a/docker/wasi-sdk-pthread.cmake b/docker/wasi-sdk-pthread.cmake index 6135445..2646ff4 100644 --- a/docker/wasi-sdk-pthread.cmake +++ b/docker/wasi-sdk-pthread.cmake @@ -28,6 +28,8 @@ set(CMAKE_CXX_COMPILER_TARGET ${triple}) set(CMAKE_ASM_COMPILER_TARGET ${triple}) SET(CMAKE_SYSROOT /wasi-sysroot) +set(CMAKE_CXX_FLAGS_INIT "-fno-exceptions") + # Don't look in the sysroot for executables to run during the build set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # Only look in the sysroot (not in the host paths) for the rest diff --git a/docker/wasi-sdk.cmake b/docker/wasi-sdk.cmake index eabb877..a57449b 100644 --- a/docker/wasi-sdk.cmake +++ b/docker/wasi-sdk.cmake @@ -21,6 +21,8 @@ set(CMAKE_CXX_COMPILER_TARGET ${triple}) set(CMAKE_ASM_COMPILER_TARGET ${triple}) SET(CMAKE_SYSROOT /wasi-sysroot) +set(CMAKE_CXX_FLAGS_INIT "-fno-exceptions") + # Don't look in the sysroot for executables to run during the build set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # Only look in the sysroot (not in the host paths) for the rest diff --git a/wasi-sdk-pthread.cmake b/wasi-sdk-pthread.cmake index ba66023..f2448de 100644 --- a/wasi-sdk-pthread.cmake +++ b/wasi-sdk-pthread.cmake @@ -35,6 +35,8 @@ set(CMAKE_C_COMPILER_TARGET ${triple}) set(CMAKE_CXX_COMPILER_TARGET ${triple}) set(CMAKE_ASM_COMPILER_TARGET ${triple}) +set(CMAKE_CXX_FLAGS_INIT "-fno-exceptions") + # Don't look in the sysroot for executables to run during the build set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # Only look in the sysroot (not in the host paths) for the rest diff --git a/wasi-sdk.cmake b/wasi-sdk.cmake index f6a0059..99202e7 100644 --- a/wasi-sdk.cmake +++ b/wasi-sdk.cmake @@ -32,6 +32,8 @@ set(CMAKE_C_COMPILER_TARGET ${triple}) set(CMAKE_CXX_COMPILER_TARGET ${triple}) set(CMAKE_ASM_COMPILER_TARGET ${triple}) +set(CMAKE_CXX_FLAGS_INIT "-fno-exceptions") + # Don't look in the sysroot for executables to run during the build set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # Only look in the sysroot (not in the host paths) for the rest