From 10e1c9d187663b71fd903f5c52024ed4e2e40d19 Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Mon, 16 Mar 2026 11:29:25 +0100 Subject: [PATCH] Avoid passing sanitizer options to MSVC linker Apparently it does not support them --- CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e6a2364..52dd9816 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,9 +45,7 @@ if(MSVC) if(SANITIZERS) message(STATUS "ASan enabled") - set(SAN_FLAGS /fsanitize=address) - add_compile_options(${SAN_FLAGS}) - add_link_options(${SAN_FLAGS}) + add_compile_options(/fsanitize=address) # Note that this shouldn't be passed to the linker. endif() else() add_compile_options(-Wall -pedantic -fno-exceptions -fno-rtti