diff options
author | Tor Lillqvist <tml@collabora.com> | 2023-01-16 23:16:53 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2023-02-23 18:26:57 +0000 |
commit | 5506fba4d5d0eccd08f0dcea1164acd51c1f1f95 (patch) | |
tree | 65af3db8a60eeaad4a152200bee85f6be9dec204 /solenv/gbuild | |
parent | 378ea8aea5244ef419f3d0bb932125fa5c8b66a2 (diff) |
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 <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147521
Diffstat (limited to 'solenv/gbuild')
-rw-r--r-- | solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk | 8 |
1 files changed, 8 insertions, 0 deletions
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) |