Added toolchain file for sanitized builds
Some checks failed
ci/woodpecker/push/workflow Pipeline failed

This commit is contained in:
2025-10-02 17:56:30 +03:00
committed by Emin Arslan
parent a40487f84d
commit 2dd10e08d9
3 changed files with 28 additions and 1 deletions

5
toolchain/sanitize.cmake Normal file
View File

@@ -0,0 +1,5 @@
# We're assuming clang or gcc as the compiler.
# feel free to change if you're using msvc or something else
set(SANITIZERS_FLAGS "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all -fno-omit-frame-pointer")
set(CMAKE_CXX_FLAGS_INIT "${SANITIZERS_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS_INIT "${SANITIZERS_FLAGS}")