cmake: Enable assertions for Emscripten Debug builds

This commit is contained in:
Sebastian Krzyszkowiak 2023-11-02 07:42:01 +01:00
parent f927cb94e9
commit e5ba177910
No known key found for this signature in database
GPG key ID: E8F235CF3BDBC3FF

View file

@ -120,8 +120,8 @@ if (NOT LIBSUPERDERPY_CONFIG_INCLUDED)
message(STATUS "Sanitizers unavailable under Emscripten, disabling...") message(STATUS "Sanitizers unavailable under Emscripten, disabling...")
set(SANITIZERS_ARGS "") set(SANITIZERS_ARGS "")
endif() endif()
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g3 -s ASSERTIONS=1") set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g3 -s ASSERTIONS=2 -s SAFE_HEAP=1")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g3 -s ASSERTIONS=1") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g3 -s ASSERTIONS=2 -s SAFE_HEAP=1")
else() else()
if(MAEMO5 AND SANITIZERS_ARGS) if(MAEMO5 AND SANITIZERS_ARGS)
message(STATUS "Sanitizers unavailable on Maemo, disabling...") message(STATUS "Sanitizers unavailable on Maemo, disabling...")