summaryrefslogtreecommitdiff
path: root/vcl/Library_vcl.mk
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 /vcl/Library_vcl.mk
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 'vcl/Library_vcl.mk')
-rw-r--r--vcl/Library_vcl.mk16
1 files changed, 14 insertions, 2 deletions
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 7664927c257a..4c3abf6f08e9 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -93,6 +93,20 @@ $(eval $(call gb_Library_use_externals,vcl,\
mdds_headers \
))
+# WASM LLVM doesn't support native EH + SjLj (setjump / longjump) used by libjpeg / libpng.
+# This otherwise breaks the PCH generation, so just move the files for that case.
+ifeq (EMSCRIPTEN_TRUE,$(OS)_$(ENABLE_WASM_EXCEPTIONS))
+$(eval $(call gb_Library_add_cxxobjects,vcl,\
+ vcl/source/filter/jpeg/jpegc \
+ vcl/source/filter/png/PngImageReader \
+))
+else
+$(eval $(call gb_Library_add_exception_objects,vcl,\
+ vcl/source/filter/jpeg/jpegc \
+ vcl/source/filter/png/PngImageReader \
+))
+endif
+
$(eval $(call gb_Library_add_exception_objects,vcl,\
vcl/source/rendercontext/drawmode \
vcl/skia/SkiaHelper \
@@ -459,7 +473,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
vcl/source/filter/ixpm/xpmread \
vcl/source/filter/jpeg/Exif \
vcl/source/filter/jpeg/jpeg \
- vcl/source/filter/jpeg/jpegc \
vcl/source/filter/jpeg/JpegReader \
vcl/source/filter/jpeg/JpegWriter \
vcl/source/filter/jpeg/JpegTransform \
@@ -470,7 +483,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
vcl/source/filter/wmf/wmf \
vcl/source/filter/wmf/wmfexternal \
vcl/source/filter/wmf/wmfwr \
- vcl/source/filter/png/PngImageReader \
vcl/source/filter/png/pngwrite \
vcl/source/font/DirectFontSubstitution \
vcl/source/font/Feature \