54dabdd1e8
fix the plugin name (it was missing the leading 'q') and the name used in configure (the latter making it unnecessary to mess with it in the mkspec). the qt.prf override which forced linkage of the plugin is also removed due to being completely redundant. Change-Id: I94687a34a295c36754e36a298af902b656ba2ecc Reviewed-by: Kyle Edwards <kyle.edwards@kitware.com> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
79 lines
2.2 KiB
Plaintext
79 lines
2.2 KiB
Plaintext
# qmake configuration for building with emscripten
|
|
MAKEFILE_GENERATOR = UNIX
|
|
QMAKE_PLATFORM = wasm unix
|
|
|
|
include(../common/gcc-base.conf)
|
|
include(../common/clang.conf)
|
|
|
|
EMTERP_FLAGS = \
|
|
-s EMTERPRETIFY=1 \
|
|
-s EMTERPRETIFY_ASYNC=1 \
|
|
-s \"EMTERPRETIFY_FILE=\'data.binary\'\" \
|
|
-s ASSERTIONS=1 \
|
|
--profiling-funcs
|
|
|
|
EMCC_COMMON_LFLAGS = \
|
|
-s WASM=1 \
|
|
-s FULL_ES2=1 \
|
|
-s ALLOW_MEMORY_GROWTH=1 \
|
|
-s USE_WEBGL2=1 \
|
|
-s NO_EXIT_RUNTIME=0 \
|
|
-s ERROR_ON_UNDEFINED_SYMBOLS=1 \
|
|
--bind \
|
|
-s \"BINARYEN_METHOD=\'native-wasm\'\" \
|
|
-s \"BINARYEN_TRAP_MODE=\'clamp\'\"
|
|
|
|
# The -s arguments can also be used with release builds,
|
|
# but are here in debug for clarity.
|
|
EMCC_COMMON_LFLAGS_DEBUG = \
|
|
$$EMCC_COMMON_LFLAGS \
|
|
-s ASSERTIONS=2 \
|
|
-s DEMANGLE_SUPPORT=1 \
|
|
# -s LIBRARY_DEBUG=1 \ #print out library calls, verbose
|
|
# -s SYSCALL_DEBUG=1 \ #print out sys calls, verbose
|
|
# -s FS_LOG=1 \ #print out filesystem ops, verbose
|
|
# -s SOCKET_DEBUG \ #print out socket,network data transfer
|
|
-s GL_DEBUG=1
|
|
|
|
QMAKE_COMPILER += emscripten
|
|
|
|
QMAKE_CC = emcc
|
|
QMAKE_CXX = em++
|
|
|
|
# Practical debugging setup:
|
|
# "-g4" preserves function names for stack traces
|
|
# "-Os" produces reasonably sized binaries
|
|
QMAKE_CFLAGS_DEBUG -= -g
|
|
QMAKE_CXXFLAGS_DEBUG -= -g
|
|
QMAKE_CFLAGS_DEBUG += -Os -g4
|
|
QMAKE_CXXFLAGS_DEBUG += -Os -g4
|
|
QMAKE_LFLAGS_DEBUG += -Os -g4
|
|
|
|
QMAKE_CXXFLAGS_RELEASE -= -O2
|
|
QMAKE_CXXFLAGS_RELEASE += -O3
|
|
QMAKE_CFLAGS_RELEASE -= -O2
|
|
QMAKE_CFLAGS_RELEASE += -O3
|
|
QMAKE_LFLAGS_RELEASE += -O3
|
|
QMAKE_CFLAGS_OPTIMIZE += -O3
|
|
QMAKE_CFLAGS_OPTIMIZE_FULL += -Oz
|
|
|
|
QMAKE_LINK = $$QMAKE_CXX
|
|
QMAKE_LINK_SHLIB = $$QMAKE_CXX
|
|
QMAKE_LINK_C = $$QMAKE_CC
|
|
QMAKE_LINK_C_SHLIB = $$QMAKE_CC
|
|
|
|
QMAKE_LIBS_THREAD = $$QMAKE_CFLAGS_THREAD
|
|
|
|
QMAKE_LFLAGS += $$EMCC_COMMON_LFLAGS
|
|
QMAKE_LFLAGS_DEBUG += $$EMCC_COMMON_LFLAGS_DEBUG
|
|
|
|
QMAKE_PREFIX_SHLIB = lib
|
|
QMAKE_EXTENSION_SHLIB = so # llvm bitcode, linked to js in post_link
|
|
QMAKE_PREFIX_STATICLIB = lib
|
|
QMAKE_EXTENSION_STATICLIB = a # llvm bitcode
|
|
|
|
QMAKE_AR = emar cqs
|
|
QMAKE_DISTCLEAN += *.html *.js *.wasm
|
|
|
|
load(qt_config)
|