solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk | 8 ++++++++ 1 file changed, 8 insertions(+)
New commits: commit 5506fba4d5d0eccd08f0dcea1164acd51c1f1f95 Author: Tor Lillqvist <t...@collabora.com> AuthorDate: Mon Jan 16 23:16:53 2023 +0200 Commit: Tor Lillqvist <t...@collabora.com> CommitDate: Thu Feb 23 18:26:57 2023 +0000 Adapt for --enable-wasm-exceptions Actually, it seems that to build core with --fwasm-exceptions for use in a LibreOffice Technology -using WASM executable, you need to compile *everything* with that (i.e. *all* of core's externals). Just these gbuild things are not enough to ensure that. You have to put CC=emcc -pthread -fwasm-exceptions -s SUPPORT_LONGJMP=wasm CXX=em++ -pthread -fwasm-exceptions -s SUPPORT_LONGJMP=wasm into your autogen.input. Change-Id: I10d21ad0f73e7e5d72864864d595077bd770f4f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145646 Reviewed-by: Tor Lillqvist <t...@collabora.com> Tested-by: Tor Lillqvist <t...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147521 diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk index 8831aeeb5d54..fdce92af0abe 100644 --- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk +++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk @@ -39,7 +39,15 @@ gb_EMSCRIPTEN_EXCEPT = -s DISABLE_EXCEPTION_CATCHING=0 endif gb_CXXFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS) + +ifeq ($(ENABLE_WASM_EXCEPTIONS),TRUE) +# Here we don't use += because gb_LinkTarget_EXCEPTIONFLAGS from com_GCC_defs.mk contains -fexceptions and +# gb_EMSCRIPTEN_EXCEPT already has -fwasm-exceptions +gb_LinkTarget_EXCEPTIONFLAGS = $(gb_EMSCRIPTEN_EXCEPT) +else gb_LinkTarget_EXCEPTIONFLAGS += $(gb_EMSCRIPTEN_EXCEPT) +endif + gb_LinkTarget_CFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS) gb_LinkTarget_CXXFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_EXCEPT) ifeq ($(ENABLE_QT5),TRUE)