From f77174e3ede6cb58a99a367ac2f082c689ec1a7d Mon Sep 17 00:00:00 2001 From: halx99 Date: Tue, 5 Sep 2023 21:41:32 +0800 Subject: [PATCH] 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/ --- cmake/AXConfigDefine.cmake | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cmake/AXConfigDefine.cmake b/cmake/AXConfigDefine.cmake index 1389b2f70b..04b786766c 100644 --- a/cmake/AXConfigDefine.cmake +++ b/cmake/AXConfigDefine.cmake @@ -188,10 +188,6 @@ if(EMSCRIPTEN) # must via CMAKE_C_FLAGS and CMAKE_CXX_FLAGS? 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_CXX_FLAGS ${_AX_EMCC_FLAGS}) endif()