mirror of https://github.com/axmolengine/axmol.git
wasm: Dont use sourcemap, just leave cmake default -g
1. build debug: .\build.ps1 -p wasm -xb '--target','cpp_tests','--config','Debug' 2. Use chrome extension: C/C++ DevTools Support (DWARF) to debug c++ code, blog: https://developer.chrome.com/blog/wasm-debugging-2020/
This commit is contained in:
parent
0a56810af5
commit
f77174e3ed
|
@ -188,10 +188,6 @@ if(EMSCRIPTEN)
|
||||||
# must via CMAKE_C_FLAGS and CMAKE_CXX_FLAGS?
|
# must via CMAKE_C_FLAGS and CMAKE_CXX_FLAGS?
|
||||||
set(_AX_EMCC_FLAGS "-sUSE_LIBJPEG=1 -sUSE_ZLIB=1")
|
set(_AX_EMCC_FLAGS "-sUSE_LIBJPEG=1 -sUSE_ZLIB=1")
|
||||||
|
|
||||||
# Generate sourcemap if CMAKE_BUILD_TYPE is 'Debug'
|
|
||||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|
||||||
string(APPEND _AX_EMCC_FLAGS " -gsource-map")
|
|
||||||
endif()
|
|
||||||
set(CMAKE_C_FLAGS ${_AX_EMCC_FLAGS})
|
set(CMAKE_C_FLAGS ${_AX_EMCC_FLAGS})
|
||||||
set(CMAKE_CXX_FLAGS ${_AX_EMCC_FLAGS})
|
set(CMAKE_CXX_FLAGS ${_AX_EMCC_FLAGS})
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue