wasm: don’t pass thread linker opts to compiler

Emscripten now warns against passing e.g. “ALLOW_MEMORY_GROWTH”
as a compile option.

Add EMCC_THREAD_CFLAGS, which gets compiler flags only.

Pick-to: 6.3
Change-Id: Ifcf40c45ca75cfdfc98a12e6b9d47f34158b3407
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
This commit is contained in:
Morten Johan Sørvig 2022-01-12 22:24:10 +01:00
parent bb8c73ab9e
commit f50dbdb38f

View File

@ -10,6 +10,7 @@ exists($$QMAKE_QT_CONFIG) {
qtConfig(thread) {
EMCC_THREAD_LFLAGS += -pthread
EMCC_THREAD_CFLAGS += -pthread
# Create worker threads at startup. This is supposed to be an optimization,
# however exceeding the pool size has been obesverved to hang the application.
@ -47,8 +48,8 @@ exists($$QMAKE_QT_CONFIG) {
QMAKE_LFLAGS += $$EMCC_THREAD_LFLAGS
QMAKE_LFLAGS_DEBUG += $$EMCC_THREAD_LFLAGS
QMAKE_CFLAGS += $$EMCC_THREAD_LFLAGS
QMAKE_CXXFLAGS += $$EMCC_THREAD_LFLAGS
QMAKE_CFLAGS += $$EMCC_THREAD_CFLAGS
QMAKE_CXXFLAGS += $$EMCC_THREAD_CFLAGS
}
# Create js and wasm files for applications