From 66967e4d7a71e8d2c3fe436a6ec5c2aecac90989 Mon Sep 17 00:00:00 2001 From: Rodrigo Delduca <46259+skhaz@users.noreply.github.com> Date: Wed, 22 Nov 2023 07:48:58 -0300 Subject: [PATCH] Work in progress --- .github/workflows/release.yaml | 6 ++++++ CMakeLists.txt | 5 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 40a0e0c..5590000 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -69,6 +69,12 @@ jobs: [tool_requires] *: emsdk/3.1.44 + + [conf] + tools.build:cflags=["-fsanitize=address"] + tools.build:cxxflags=["-fsanitize=address"] + tools.build:exelinkflags=["-fsanitize=address"] + tools.build:sharedlinkflags=["-fsanitize=address"] EOF - name: Install Ubuntu Dependencies diff --git a/CMakeLists.txt b/CMakeLists.txt index 0dda7d8..6847b86 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,10 +40,8 @@ if(SANDBOX) endif() if (${CMAKE_SYSTEM_NAME} MATCHES "Emscripten") - target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Werror -pedantic -Os) - # target_link_libraries(${PROJECT_NAME} "--profiling") - target_link_libraries(${PROJECT_NAME} "-s RUNTIME_DEBUG") + # target_link_libraries(${PROJECT_NAME} "-s RUNTIME_DEBUG") target_link_libraries(${PROJECT_NAME} "-s ASSERTIONS=1") target_link_libraries(${PROJECT_NAME} "-s NO_DISABLE_EXCEPTION_CATCHING") @@ -53,6 +51,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Emscripten") target_link_libraries(${PROJECT_NAME} "-s EXPORTED_RUNTIME_METHODS=['callMain']") # embed(${PROJECT_NAME} "${CMAKE_BINARY_DIR}/bundle.zip" "/bundle.zip") + target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wextra -Werror -pedantic -Os) elseif(CMAKE_BUILD_TYPE MATCHES "Debug") if (MSVC) target_compile_options(${PROJECT_NAME} PRIVATE /W4 /Od /Zi)