diff --git a/build.sh b/build.sh index 01c524e67..d153e47af 100755 --- a/build.sh +++ b/build.sh @@ -98,7 +98,7 @@ if [ "$PIC" = "true" ]; then PIC_FLAG=--pic; fi #export LDFLAGS+=" --source-map-base http://localhost:3000/lib/" # Common compiler flags -export CFLAGS="-O3 -fno-rtti -fexceptions -mnontrapping-fptoint -pthread" +export CFLAGS="-O3 -fno-rtti -mnontrapping-fptoint -pthread" if [ "$SIMD" = "true" ]; then export CFLAGS+=" -msimd128 -DWASM_SIMD_COMPAT_SLOW"; fi if [ "$WASM_BIGINT" = "true" ]; then # libffi needs to detect WASM_BIGINT support at compile time @@ -108,7 +108,7 @@ if [ "$WASM_FS" = "true" ]; then export CFLAGS+=" -DWASMFS"; fi if [ "$WASM_EH" = "true" ]; then export CFLAGS+=" -sSUPPORT_LONGJMP=wasm"; fi if [ "$LTO" = "true" ]; then export CFLAGS+=" -flto"; fi if [ "$PIC" = "true" ]; then export CFLAGS+=" -fPIC"; fi -export CXXFLAGS="$CFLAGS" +export CXXFLAGS="$CFLAGS -fexceptions" export LDFLAGS="-L$TARGET/lib -O3" if [ "$WASM_BIGINT" = "true" ]; then export LDFLAGS+=" -sWASM_BIGINT"; fi if [ "$WASM_FS" = "true" ]; then export LDFLAGS+=" -sWASMFS"; fi