From 6e7a7d5fb917b9099788a5917507dbfa56d5495c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Tue, 27 Nov 2018 22:02:07 +0100 Subject: Wasm: enable source map support for debug builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- mkspecs/features/wasm/wasm.prf | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mkspecs/features/wasm/wasm.prf') 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) -- cgit v1.2.3