summaryrefslogtreecommitdiff
path: root/external/cairo
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2023-01-23 16:29:42 +0200
committerTor Lillqvist <tml@collabora.com>2023-01-23 22:58:54 +0000
commit5cd3a8ec6d36a389eb0be4d59f4570e3bda92dc5 (patch)
tree2e200e91622d58bfb7d2a96f7c46d06847ef0f6e /external/cairo
parent7a6324ea0d81bbe2bba09f8a7f5230342a4f4e85 (diff)
Enforce compiling cairo and pixman for WASM with -O3
Earlier, no -O flag at all got used in the cairo and pixman builds. Which was sad, as these two libraries are performance-critical. Yes, this change is quick-and-dirty. The proper way would be to modify things in solenv/gbuild. But that is somewhat complicated. In general it seems fairly hard to make sure the same compiler flags get used for every external bundled library. Each external library is a special snowflake, more or less, with a differently structured ExternalProject makefile. For instance for the libwpd library (just picked randomly as an example), even -O2 gets used. (Which as such is OK.) This despite solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk apparently trying to enforce use of -O1 for Emscripten. This change has a visible impact on the performance of COWASM. Change-Id: I99d74db2da733134fde16661881856f9a81100f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146009 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'external/cairo')
-rw-r--r--external/cairo/ExternalProject_cairo.mk2
-rw-r--r--external/cairo/ExternalProject_pixman.mk2
2 files changed, 2 insertions, 2 deletions
diff --git a/external/cairo/ExternalProject_cairo.mk b/external/cairo/ExternalProject_cairo.mk
index fd934906343b..b677098482ff 100644
--- a/external/cairo/ExternalProject_cairo.mk
+++ b/external/cairo/ExternalProject_cairo.mk
@@ -48,7 +48,7 @@ $(call gb_ExternalProject_get_state_target,cairo,build) :
$(gb_RUN_CONFIGURE) ./configure \
$(if $(debug),STRIP=" ") \
$(if $(filter ANDROID iOS,$(OS)),CFLAGS="$(if $(debug),-g) $(ZLIB_CFLAGS) $(gb_VISIBILITY_FLAGS)") \
- $(if $(filter EMSCRIPTEN,$(OS)),CFLAGS=-DCAIRO_NO_MUTEX" $(ZLIB_CFLAGS) -Wno-enum-conversion $(gb_EMSCRIPTEN_CPPFLAGS)" ) \
+ $(if $(filter EMSCRIPTEN,$(OS)),CFLAGS="-O3 -DCAIRO_NO_MUTEX $(ZLIB_CFLAGS) -Wno-enum-conversion $(gb_EMSCRIPTEN_CPPFLAGS)" ) \
$(if $(filter-out EMSCRIPTEN ANDROID iOS,$(OS)), \
CFLAGS="$(CFLAGS) $(call gb_ExternalProject_get_build_flags,cairo) $(ZLIB_CFLAGS)" \
LDFLAGS="$(call gb_ExternalProject_get_link_flags,cairo)" \
diff --git a/external/cairo/ExternalProject_pixman.mk b/external/cairo/ExternalProject_pixman.mk
index 9293b9234013..ac78b23d5c9e 100644
--- a/external/cairo/ExternalProject_pixman.mk
+++ b/external/cairo/ExternalProject_pixman.mk
@@ -28,7 +28,7 @@ $(call gb_ExternalProject_get_state_target,pixman,build) :
$(if $(filter ANDROID,$(OS)),--disable-arm-simd --disable-arm-neon --disable-arm-a64-neon --disable-arm-iwmmxt) \
$(gb_CONFIGURE_PLATFORMS) \
$(if $(CROSS_COMPILING),$(if $(filter INTEL ARM,$(CPUNAME)),ac_cv_c_bigendian=no)) \
- $(if $(filter EMSCRIPTEN,$(OS)),CFLAGS="-pthread") \
+ $(if $(filter EMSCRIPTEN,$(OS)),CFLAGS="-O3 -pthread") \
&& $(MAKE) \
)
$(call gb_Trace_EndRange,pixman,EXTERNAL)