summaryrefslogtreecommitdiff
path: root/configure.ac
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 /configure.ac
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 'configure.ac')
-rw-r--r--configure.ac15
1 files changed, 15 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index be3e9072195a..0b3dbd5e42fc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1990,6 +1990,13 @@ AC_ARG_ENABLE(wasm-strip,
[Strip the static build like for WASM/emscripten platform.]),
,)
+AC_ARG_ENABLE(wasm-exceptions,
+ AS_HELP_STRING([--enable-wasm-exceptions],
+ [Build with native WASM exceptions (AKA -fwasm-exceptions),
+ matter of fact, this is currently not finished by any implementation)
+ (see https://webassembly.org/roadmap/ for the current state]),
+,)
+
AC_ARG_ENABLE(xmlhelp,
AS_HELP_STRING([--disable-xmlhelp],
[Disable XML help support]),
@@ -3008,6 +3015,11 @@ if test "$enable_wasm_strip" = "yes"; then
test "${with_locales+set}" = set || with_locales=en
fi
+if test "$enable_wasm_exceptions" = yes; then
+ ENABLE_WASM_EXCEPTIONS=TRUE
+fi
+AC_SUBST(ENABLE_WASM_EXCEPTIONS)
+
# Whether to build "avmedia" functionality or not.
if test "$enable_avmedia" = yes; then
@@ -6029,6 +6041,9 @@ if test -z "$enable_pch"; then
enable_pch=no
fi
fi
+if test "$enable_pch" != no -a "$_os" = Emscripten -a "$ENABLE_WASM_EXCEPTIONS" = TRUE; then
+ AC_MSG_ERROR([PCH currently isn't supported for Emscripten with native EH (nEH) because of missing Sj/Lj support with nEH in clang.])
+fi
if test "$enable_pch" != "no" -a "$_os" != "WINNT" -a "$GCC" != "yes" ; then
AC_MSG_ERROR([Precompiled header not yet supported for your platform/compiler])
fi