mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
CMake: Enable EXITFREE for all *San.
This commit is contained in:
parent
fe6bd8cae2
commit
624630eff5
@ -95,7 +95,7 @@ foreach(gen_cdef ${gen_cdefs} DO_NOT_DEFINE_EMPTY_ATTRIBUTES)
|
||||
list(APPEND gen_cflags "-D${gen_cdef}")
|
||||
endif()
|
||||
endforeach()
|
||||
if(CLANG_ASAN_UBSAN)
|
||||
if(CLANG_ASAN_UBSAN OR CLANG_MSAN OR CLANG_TSAN)
|
||||
list(APPEND gen_cflags "-DEXITFREE")
|
||||
endif()
|
||||
|
||||
@ -197,10 +197,12 @@ if(CLANG_ASAN_UBSAN)
|
||||
set_property(TARGET nvim APPEND_STRING PROPERTY LINK_FLAGS "-fsanitize=address -fsanitize=undefined ")
|
||||
elseif(CLANG_MSAN)
|
||||
message(STATUS "Enabling Clang memory sanitizer for nvim.")
|
||||
set_property(TARGET nvim APPEND_STRING PROPERTY COMPILE_FLAGS "-DEXITFREE ")
|
||||
set_property(TARGET nvim APPEND_STRING PROPERTY COMPILE_FLAGS "-fsanitize=memory -fsanitize-memory-track-origins -fno-omit-frame-pointer -fno-optimize-sibling-calls ")
|
||||
set_property(TARGET nvim APPEND_STRING PROPERTY LINK_FLAGS "-fsanitize=memory -fsanitize-memory-track-origins ")
|
||||
elseif(CLANG_TSAN)
|
||||
message(STATUS "Enabling Clang thread sanitizer for nvim.")
|
||||
set_property(TARGET nvim APPEND_STRING PROPERTY COMPILE_FLAGS "-DEXITFREE ")
|
||||
set_property(TARGET nvim APPEND_STRING PROPERTY COMPILE_FLAGS "-fsanitize=thread ")
|
||||
set_property(TARGET nvim APPEND_STRING PROPERTY LINK_FLAGS "-fsanitize=thread ")
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user