[Libreoffice-commits] core.git: Branch 'feature/wasm' - solenv/gbuild

Thorsten Behrens (via logerrit) logerrit at kemper.freedesktop.org
Sun Jan 24 22:55:23 UTC 2021


 solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit f7948f272660cc789a0e68ff69156aba536c5215
Author:     Thorsten Behrens <thorsten.behrens at allotropia.de>
AuthorDate: Sun Jan 24 23:54:02 2021 +0100
Commit:     Thorsten Behrens <thorsten.behrens at allotropia.de>
CommitDate: Sun Jan 24 23:54:02 2021 +0100

    Get debug builds working
    
    - source maps really don't like SAFE_HEAP=1
      (c.f. https://github.com/emscripten-core/emscripten/issues/8584)
    - get OptFlags passed on consistently while at it
    
    Change-Id: I7d234de6b069877a558a2f3c7ab9dd5398d18ef2

diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index b0e26432f173..a3c52e782554 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -12,7 +12,8 @@ gb_UnoApiHeadersTarget_select_variant = $(if $(filter udkapi,$(1)),comprehensive
 include $(GBUILDDIR)/platform/unxgcc.mk
 
 gb_RUN_CONFIGURE := $(SRCDIR)/solenv/bin/run-configure
-gb_EMSCRIPTEN_CPPFLAGS := -pthread -s TOTAL_MEMORY=1GB -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=4 -s SAFE_HEAP=1
+# avoid -s SAFE_HEAP=1 - c.f. gh#8584 this breaks source maps
+gb_EMSCRIPTEN_CPPFLAGS := -pthread -s TOTAL_MEMORY=1GB -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=4
 gb_EMSCRIPTEN_LDFLAGS := $(gb_EMSCRIPTEN_CPPFLAGS) --bind -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=2 -s EXIT_RUNTIME=1 -s EXTRA_EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16"]
 gb_EMSCRIPTEN_QTDEFS := -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
 
@@ -25,7 +26,10 @@ gb_LinkTarget_CXXFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_QTDEFS) $(gb
 # WASM is also optimized at link time, but ignores linker flags, so wants $(gb_COMPILEROPTFLAGS)
 gb_LINKEROPTFLAGS :=
 gb_LINKERSTRIPDEBUGFLAGS :=
-gb_LinkTarget_LDFLAGS += $(gb_EMSCRIPTEN_LDFLAGS) $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_EXCEPT) $(gb_COMPILEROPTFLAGS)
+gb_LinkTarget_LDFLAGS += $(gb_EMSCRIPTEN_LDFLAGS) $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_EXCEPT) \
+  $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS), \
+  $(if $(ENABLE_OPTIMIZED_DEBUG),$(gb_COMPILERDEBUGOPTFLAGS), \
+  $(gb_COMPILERNOOPTFLAGS)))
 
 define gb_Library_get_rpath
 endef


More information about the Libreoffice-commits mailing list