Skip to content

Commit

Permalink
wasm: remove deprecated argument for source maps
Browse files Browse the repository at this point in the history
-g4 was deprecated in Emscripten 2.0.17, and since we are well past
that version we can safely use -gsource-map instead.

Change-Id: I497155619d6320661f6be0e220b52fa7d6ca0b8e
Reviewed-by: David Skoland <[email protected]>
Reviewed-by: Morten Johan Sørvig <[email protected]>
  • Loading branch information
lpotter committed Dec 13, 2021
1 parent 81a31be commit 663c1b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmake/QtWasmHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function (qt_internal_setup_wasm_target_properties wasmTarget)
# Pass --source-map-base on the linker line. This informs the
# browser where to find the source files when debugging.
# -g4 to make source maps for debugging
target_link_options("${wasmTarget}" INTERFACE "-g4" "--source-map-base" "${WASM_SOURCE_MAP_BASE}")
target_link_options("${wasmTarget}" INTERFACE "-gsource-map" "--source-map-base" "${WASM_SOURCE_MAP_BASE}")

endif()

Expand Down
7 changes: 1 addition & 6 deletions mkspecs/features/wasm/wasm.prf
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,7 @@ CONFIG(debug):!isEmpty(QT_WASM_SOURCE_MAP) {

EMCC_VERSION = $$qtSystemEmccVersion()

greaterThan(EMCC_VERSION, 2.0.16) {
# emsdk 2.0.17 depreciates use of -g4
QMAKE_LFLAGS += -gsource-map
} else {
QMAKE_LFLAGS += -g4
}
QMAKE_LFLAGS += -gsource-map
# 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/
Expand Down

0 comments on commit 663c1b8

Please sign in to comment.