summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@qt.io>2018-11-27 22:02:07 +0100
committerMorten Johan Sørvig <morten.sorvig@qt.io>2019-02-07 16:11:23 +0000
commit6e7a7d5fb917b9099788a5917507dbfa56d5495c (patch)
tree7f39d6fcae5221c688476ded3c9a8a3e979c0d41 /mkspecs
parent60addee9384cb8c589f7abf9020f7d6d7a6f4d63 (diff)
Wasm: enable source map support for debug builds
The source map location can be configured by setting QMAKE_WASM_SOURCE_MAP_BASE in the .pro file. Fall back to “http://localhost:8000” if not set. Task-number: QTBUG-72002 Change-Id: I9da80dacdefc272f267e5db4caac274d93ba4479 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/wasm/wasm.prf7
1 files changed, 7 insertions, 0 deletions
diff --git a/mkspecs/features/wasm/wasm.prf b/mkspecs/features/wasm/wasm.prf
index 13ac43443d..c885b166ce 100644
--- a/mkspecs/features/wasm/wasm.prf
+++ b/mkspecs/features/wasm/wasm.prf
@@ -72,6 +72,13 @@ contains(TEMPLATE, .*app) {
}
}
+# Pass --source-map-base on the linker line. This informs the
+# browser where to find the source files when debugging.
+WASM_SOURCE_MAP_BASE = http://localhost:8000/
+!isEmpty(QMAKE_WASM_SOURCE_MAP_BASE):\
+ WASM_SOURCE_MAP_BASE = $$QMAKE_WASM_SOURCE_MAP_BASE
+CONFIG(debug): QMAKE_LFLAGS += --source-map-base $$WASM_SOURCE_MAP_BASE
+
# Creates the stand-alone version of the library from bitcode
!static:contains(TEMPLATE, .*lib): {
load(resolve_target)