wasm: fix system lib detection and use

This is a revert of eea08d376a.
We need these flags to be added to the compiler in order to find the
emscripten ports to be able to use them.

Task-number: QTBUG-73127
Change-Id: Icf70f456947aef04dc79b2328f2e95fb1e94fcf8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
Lorn Potter 2019-02-19 17:07:50 +10:00
parent ca32a373b3
commit 70b558ad5b

View File

@ -21,6 +21,11 @@ EMCC_COMMON_LFLAGS = \
--bind \
-s \"BINARYEN_TRAP_MODE=\'clamp\'\"
EMCC_USE_PORTS_FLAGS = \
-s USE_LIBPNG=1 \
-s USE_FREETYPE=1 \
-s USE_ZLIB=1
# The -s arguments can also be used with release builds,
# but are here in debug for clarity.
EMCC_COMMON_LFLAGS_DEBUG = \
@ -38,6 +43,9 @@ QMAKE_COMPILER += emscripten
QMAKE_CC = emcc
QMAKE_CXX = em++
QMAKE_CFLAGS += $$EMCC_USE_PORTS_FLAGS
QMAKE_CXXFLAGS += $$EMCC_USE_PORTS_FLAGS
# Practical debugging setup:
# "-g4" preserves function names for stack traces
# "-Os" produces reasonably sized binaries