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)