Build with asan

This commit is contained in:
momo5502
2025-03-19 06:45:33 +01:00
parent b6ed431ccc
commit 9cf61cb058
2 changed files with 9 additions and 3 deletions

View File

@@ -151,6 +151,7 @@ jobs:
platform:
- Windows x86_64
- Linux x86_64 GCC
- Linux x86_64 GCC Sanitizer
- Linux x86_64 Clang
- macOS arm64
- macOS x86_64
@@ -166,6 +167,9 @@ jobs:
preset: release
- platform: Windows x86_64
runner: windows-latest
- platform: Linux x86_64 GCC Sanitizer
runner: ubuntu-24.04
cmake-options: "-DMOMO_ENABLE_SANITIZER=On"
- platform: Linux x86_64 GCC
runner: ubuntu-24.04
- platform: Linux x86_64 Clang
@@ -248,6 +252,7 @@ jobs:
platform:
- Windows x86_64
- Linux x86_64 GCC
- Linux x86_64 GCC Sanitizer
- Linux x86_64 Clang
- macOS arm64
- macOS x86_64
@@ -267,6 +272,8 @@ jobs:
runner: windows-latest
- platform: Linux x86_64 GCC
runner: ubuntu-24.04
- platform: Linux x86_64 GCC Sanitizer
runner: ubuntu-24.04
- platform: Linux x86_64 Clang
runner: ubuntu-24.04
- platform: macOS arm64

View File

@@ -99,9 +99,8 @@ endif()
##########################################
if(MOMO_ENABLE_SANITIZER)
momo_add_c_and_cxx_compile_options(
-fsanitize=address
)
momo_add_c_and_cxx_compile_options(-fsanitize=address)
add_link_options(-fsanitize=address)
endif()
##########################################