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
+4 -1
View File
@@ -14,7 +14,10 @@ set(benchmark_SOURCES
)
add_executable(${PROJECT_NAME} ${benchmark_SOURCES})
add_sanitizers(${PROJECT_NAME})
if(CHATTERINO_SANITIZER_SUPPORT)
add_sanitizers(${PROJECT_NAME})
endif()
target_link_libraries(${PROJECT_NAME} PRIVATE chatterino-lib)
target_link_libraries(${PROJECT_NAME} PRIVATE chatterino-mocks)