summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2023-01-11 17:39:06 +0200
committerTor Lillqvist <tml@collabora.com>2023-01-11 22:49:45 +0000
commit67471b3a7fb33884e70e29163b4eddf47fa85115 (patch)
tree5bdfc728f447e45f56ea9726048f55943049948f /solenv
parentc4cdc2cb3323cbbff42e4410e4b3d0a1d4957504 (diff)
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 <tml@collabora.com>
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk12
1 files changed, 8 insertions, 4 deletions
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