summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorMorten Sørvig <morten.sorvig@qt.io>2022-05-10 09:36:59 +0200
committerMorten Sørvig <morten.sorvig@qt.io>2022-06-01 13:52:47 +0200
commit86103f3af562152f642140e393c7beacac311dea (patch)
tree6c2985492b34a23887c489b3061f61a4d8de8f6b /mkspecs
parentcfa44787de49b85eddf8ceebd21764f1138d92c9 (diff)
wasm: don't enable specialHTMLTargets by default
Adding specialHTMLTargets to EXPORTED_RUNTIME_METHODS carries the obligation to actually use it as well; failing to do so makes Emscripten stop with a reference error on startup. However, we can't guarantee that Qt will use it in all cases. The current usage depends on QGuiApplication being used. Application code could be using QCoreApplication, or no application object at all. Detect if specialHTMLTargets is present instead, and then enable the code paths which uses it if that's the case. This means that apps which want to use e.g. multiple browser windows can opt into support by making sure EXPORTED_RUNTIME_METHODS contains specialHTMLTargets. Change-Id: I81105aa01946602fcf593f170e305d7dc9bad3be Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/wasm-emscripten/qmake.conf2
1 files changed, 1 insertions, 1 deletions
diff --git a/mkspecs/wasm-emscripten/qmake.conf b/mkspecs/wasm-emscripten/qmake.conf
index 140f2b4801..b95cf0fcc6 100644
--- a/mkspecs/wasm-emscripten/qmake.conf
+++ b/mkspecs/wasm-emscripten/qmake.conf
@@ -34,7 +34,7 @@ EMCC_COMMON_LFLAGS += \
-s FULL_ES3=1 \
-s USE_WEBGL2=1 \
-s ERROR_ON_UNDEFINED_SYMBOLS=1 \
- -s EXPORTED_RUNTIME_METHODS=[UTF16ToString,stringToUTF16,specialHTMLTargets] \
+ -s EXPORTED_RUNTIME_METHODS=[UTF16ToString,stringToUTF16] \
--bind \
-s FETCH=1 \
-s MODULARIZE=1 \