-fno-omit-frame-pointer disabled for Windows ASAN builds

This commit is contained in:
Vojtech Bubnik 2021-06-01 11:12:14 +02:00
parent 20ba7c0a1f
commit 206bef7623

View File

@ -243,9 +243,10 @@ endif()
if (SLIC3R_ASAN)
# ASAN should be available on MSVC starting with Visual Studio 2019 16.9
# https://devblogs.microsoft.com/cppblog/address-sanitizer-for-msvc-now-generally-available/
add_compile_options(-fsanitize=address -fno-omit-frame-pointer)
add_compile_options(-fsanitize=address)
if (NOT MSVC)
add_compile_options(-fno-omit-frame-pointer)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=address")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fsanitize=address")