chore: make sanitizers opt in (#6493)

Make code sanitizers opt in with the `CHATTERINO_SANITIZER_SUPPORT` CMake option. After that's enabled, use the `SANITIZE_*` flag to enable individual sanitizers.

Building tests is not required - sanitizers can be enabled in the app by itself.
This commit is contained in:
pajlada
2025-09-25 23:43:54 +02:00
committed by GitHub
parent 117d06b92c
commit 6e0533e1da
7 changed files with 30 additions and 10 deletions
+1 -3
View File
@@ -922,10 +922,8 @@ if (BUILD_APP)
add_executable(${EXECUTABLE_PROJECT} main.cpp)
endif()
if(COMMAND add_sanitizers)
if(CHATTERINO_SANITIZER_SUPPORT)
add_sanitizers(${EXECUTABLE_PROJECT})
else()
message(WARNING "Sanitizers support is disabled")
endif()
if (CHATTERINO_STATIC_QT_BUILD)