summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2021-10-02 12:43:07 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2022-01-19 16:13:14 +0100
commitae22f7d06246ee21f9c8e9f35f4477e88843c58b (patch)
treea5bceb97777bf2cb0d1d9cf5711b94e25ceed183 /solenv
parent5f3b92f89767deda73620bc5e77e1933dfa81dcc (diff)
WASM add option to build with native exceptions
Currently disabled, as literally no runtime has a working implementation. It also currently conflicts with LLVM's SjLj (AKA setjmp / longjump) when generating WASM bytecode, but the only offending code doesn't use exceptions, so this can be avoided in general. Change-Id: I2b338f3529e7350d54a7950772c6e7aae2282fe7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128600 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk9
1 files changed, 7 insertions, 2 deletions
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index 68ad8ec4be69..f0063f7c07b1 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -31,11 +31,16 @@ gb_EMSCRIPTEN_LDFLAGS += --bind -s FORCE_FILESYSTEM=1 -s WASM_BIGINT=1 -s ERROR_
gb_EMSCRIPTEN_QTDEFS := -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
gb_Executable_EXT := .html
-gb_EMSCRIPTEN_EXCEPT := -s DISABLE_EXCEPTION_CATCHING=0
+ifeq ($(ENABLE_WASM_EXCEPTIONS),TRUE)
+gb_EMSCRIPTEN_EXCEPT = -fwasm-exceptions
+else
+gb_EMSCRIPTEN_EXCEPT = -s DISABLE_EXCEPTION_CATCHING=0
+endif
gb_CXXFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS)
+gb_LinkTarget_EXCEPTIONFLAGS += $(gb_EMSCRIPTEN_EXCEPT)
gb_LinkTarget_CFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_QTDEFS)
-gb_LinkTarget_CXXFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_QTDEFS) $(gb_EMSCRIPTEN_EXCEPT)
+gb_LinkTarget_CXXFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_QTDEFS)
gb_LinkTarget_LDFLAGS += $(gb_EMSCRIPTEN_LDFLAGS) $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_EXCEPT)
# Linker and compiler optimize + debug flags are handled in LinkTarget.mk