build: add ENABLE_SANITIZER for other sanitizer types

This commit is contained in:
Marcus Holland-Moritz 2025-05-13 09:35:51 +02:00
parent 05166815b2
commit b1f6fd72a7

View File

@ -879,6 +879,13 @@ foreach(tgt dwarfs_test_helpers dwarfs_follybenchmark_lite
-fno-omit-frame-pointer)
target_link_options(${tgt} PRIVATE -fsanitize=undefined)
endif()
if(ENABLE_SANITIZER)
target_compile_options(${tgt} PRIVATE -fsanitize=${ENABLE_SANITIZER}
-fno-omit-frame-pointer)
target_link_options(${tgt} PRIVATE -fsanitize=${ENABLE_SANITIZER})
endif()
endif()
endforeach()