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

New commits:
commit 378ea8aea5244ef419f3d0bb932125fa5c8b66a2
Author:     Tor Lillqvist <t...@collabora.com>
AuthorDate: Wed Jan 11 17:39:06 2023 +0200
Commit:     Tor Lillqvist <t...@collabora.com>
CommitDate: Thu Feb 23 18:26:32 2023 +0000

    Use gb_EMSCRIPTEN_QTDEFS only when building with Qt5
    
    Move -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE to gb_EMSCRIPTEN_CPPFLAGS.
    
    Change-Id: I435a8482e9d04d9c8218926865738397e2897109
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145354
    Tested-by: Jenkins
    Reviewed-by: Tor Lillqvist <t...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147520
    Tested-by: Tor Lillqvist <t...@collabora.com>

diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk 
b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index b0629894a07e..8831aeeb5d54 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -18,7 +18,7 @@ gb_EMSCRIPTEN_PRE_JS_FILES = \
 
 gb_RUN_CONFIGURE := $(SRCDIR)/solenv/bin/run-configure
 # avoid -s SAFE_HEAP=1 - c.f. gh#8584 this breaks source maps
-gb_EMSCRIPTEN_CPPFLAGS := -pthread -s USE_PTHREADS=1
+gb_EMSCRIPTEN_CPPFLAGS := -pthread -s USE_PTHREADS=1 -D_LARGEFILE64_SOURCE 
-D_LARGEFILE_SOURCE
 gb_EMSCRIPTEN_LDFLAGS := $(gb_EMSCRIPTEN_CPPFLAGS)
 
 # Initial memory size and worker thread pool
@@ -28,7 +28,7 @@ gb_EMSCRIPTEN_LDFLAGS += -s TOTAL_MEMORY=1GB -s 
PTHREAD_POOL_SIZE=4
 # See emscripten.py, finalize_wasm, modify_wasm = True
 # So we need WASM_BIGINT=1 and ASSERTIONS=1 (2 implies STACK_OVERFLOW_CHECK)
 gb_EMSCRIPTEN_LDFLAGS += --bind -s FORCE_FILESYSTEM=1 -s WASM_BIGINT=1 -s 
ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s 
EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16","UTF8ToString","allocateUTF8","printErr","ccall","cwrap"]
-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
+gb_EMSCRIPTEN_QTDEFS := -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS 
-DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
 
 gb_Executable_EXT := .html
 ifeq ($(ENABLE_WASM_EXCEPTIONS),TRUE)
@@ -40,8 +40,12 @@ endif
 
 gb_CXXFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS)
 gb_LinkTarget_EXCEPTIONFLAGS += $(gb_EMSCRIPTEN_EXCEPT)
-gb_LinkTarget_CFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_QTDEFS)
-gb_LinkTarget_CXXFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_QTDEFS) 
$(gb_EMSCRIPTEN_EXCEPT)
+gb_LinkTarget_CFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS)
+gb_LinkTarget_CXXFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_EXCEPT)
+ifeq ($(ENABLE_QT5),TRUE)
+gb_LinkTarget_CFLAGS += $(gb_EMSCRIPTEN_QTDEFS)
+gb_LinkTarget_CXXFLAGS += $(gb_EMSCRIPTEN_QTDEFS)
+endif
 gb_LinkTarget_LDFLAGS += $(gb_EMSCRIPTEN_LDFLAGS) $(gb_EMSCRIPTEN_CPPFLAGS) 
$(gb_EMSCRIPTEN_EXCEPT)
 
 # Linker and compiler optimize + debug flags are handled in LinkTarget.mk

Reply via email to