WASM fix orcus native exception handling (NEH)

While this fixes the build with --enable-wasm-exceptions, the
resulting binary generates an "indirect call signature mismatch",
which doesn't happen with the non-NEH build.

The Chrome DWARF backtrace points to CallbackTaskScheduling().
Further debugging reveals, it's actually the UpdateMinPeriod
call for the "desktop::Desktop m_firstRunTimer" Timer.
Disturbingly the debug dynamic_cast<Timer> at the start of the
job loop fails, and the fallback generic job output is
chosen, AKA:

info:vcl.schedule: 6516 0x3871618  i: 0 a: 1 p: 1 \
    desktop::Desktop m_firstRunTimer

m_firstRunTimer is a Timer member in the Desktop class, so this
looks like some memory corruption or toolchain problem.

The size difference is more then 10% and it's supposed to be
faster too. FWIW the optimized link time is still high and needs
32GB+ memory compared to the 13GB non-optimized memory usage.

Change-Id: I06d37ecece09000fd3b72a73e7bf40f0b0f61457
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130216
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
This commit is contained in:
Jan-Marek Glogowski 2022-02-10 09:38:40 +01:00
parent 0b0d41b48f
commit 26603bc9ef

View file

@ -91,8 +91,8 @@ $(call gb_ExternalProject_get_state_target,liborcus,build) :
$(call gb_ExternalProject_run,build,\
$(if $(liborcus_LIBS),LIBS='$(liborcus_LIBS)') \
$(if $(liborcus_CXXFLAGS),CXXFLAGS='$(liborcus_CXXFLAGS)') \
$(if $(liborcus_CPPFLAGS),CPPFLAGS='$(liborcus_CPPFLAGS) $(gb_EMSCRIPTEN_CPPFLAGS)') \
$(if $(liborcus_LDFLAGS),LDFLAGS='$(liborcus_LDFLAGS)') \
$(if $(liborcus_CPPFLAGS),CPPFLAGS='$(liborcus_CPPFLAGS) $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_EXCEPT)') \
$(if $(liborcus_LDFLAGS),LDFLAGS='$(liborcus_LDFLAGS) $(gb_EMSCRIPTEN_EXCEPT)') \
MDDS_CFLAGS='$(MDDS_CFLAGS)' \
MDDS_LIBS=' ' \
MAKE=$(MAKE) $(gb_RUN_CONFIGURE) ./configure \