mirror of
https://github.com/gbdev/rgbds.git
synced 2026-03-26 14:53:03 +00:00
Log with sanitizers are enabled under CMake
This can help bring attention to the MSVC difference (no UBSan there)
This commit is contained in:
@@ -33,6 +33,7 @@ if(MSVC)
|
|||||||
add_definitions(/D_CRT_SECURE_NO_WARNINGS)
|
add_definitions(/D_CRT_SECURE_NO_WARNINGS)
|
||||||
|
|
||||||
if(SANITIZERS)
|
if(SANITIZERS)
|
||||||
|
message(STATUS "ASan enabled")
|
||||||
set(SAN_FLAGS /fsanitize=address)
|
set(SAN_FLAGS /fsanitize=address)
|
||||||
add_compile_options(${SAN_FLAGS})
|
add_compile_options(${SAN_FLAGS})
|
||||||
add_link_options(${SAN_FLAGS})
|
add_link_options(${SAN_FLAGS})
|
||||||
@@ -45,6 +46,7 @@ else()
|
|||||||
add_compile_options(-Wno-gnu-zero-variadic-macro-arguments)
|
add_compile_options(-Wno-gnu-zero-variadic-macro-arguments)
|
||||||
endif()
|
endif()
|
||||||
if(SANITIZERS)
|
if(SANITIZERS)
|
||||||
|
message(STATUS "ASan and UBSan enabled")
|
||||||
set(SAN_FLAGS -fsanitize=address -fsanitize=undefined
|
set(SAN_FLAGS -fsanitize=address -fsanitize=undefined
|
||||||
-fsanitize=float-divide-by-zero)
|
-fsanitize=float-divide-by-zero)
|
||||||
add_compile_options(${SAN_FLAGS})
|
add_compile_options(${SAN_FLAGS})
|
||||||
|
|||||||
Reference in New Issue
Block a user