Log with sanitizers are enabled under CMake

This can help bring attention to the MSVC difference (no UBSan there)
This commit is contained in:
ISSOtm
2026-03-09 01:50:19 -04:00
committed by Rangi
parent 9293068370
commit aea39ec8c8

View File

@@ -33,6 +33,7 @@ if(MSVC)
add_definitions(/D_CRT_SECURE_NO_WARNINGS)
if(SANITIZERS)
message(STATUS "ASan enabled")
set(SAN_FLAGS /fsanitize=address)
add_compile_options(${SAN_FLAGS})
add_link_options(${SAN_FLAGS})
@@ -45,6 +46,7 @@ else()
add_compile_options(-Wno-gnu-zero-variadic-macro-arguments)
endif()
if(SANITIZERS)
message(STATUS "ASan and UBSan enabled")
set(SAN_FLAGS -fsanitize=address -fsanitize=undefined
-fsanitize=float-divide-by-zero)
add_compile_options(${SAN_FLAGS})