mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Handle LLVM_USE_SANITIZER=Address;Undefined (and the other way around)
Summary: Handle LLVM_USE_SANITIZER=Address;Undefined to enable ASan and UBSan If UBSan is compatible with more of the other sanitizers, maybe we should deal with this in a better way where we allow combining UBSan with any of the other sanitizers. Reviewers: samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7024 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228219 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
46c638cfc8
commit
cec4461c47
@ -404,6 +404,11 @@ if(LLVM_USE_SANITIZER)
|
||||
elseif (LLVM_USE_SANITIZER STREQUAL "Thread")
|
||||
append_common_sanitizer_flags()
|
||||
append("-fsanitize=thread" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
|
||||
elseif (LLVM_USE_SANITIZER STREQUAL "Address;Undefined" OR
|
||||
LLVM_USE_SANITIZER STREQUAL "Undefined;Address")
|
||||
append_common_sanitizer_flags()
|
||||
append("-fsanitize=address,undefined -fno-sanitize=vptr,function -fno-sanitize-recover"
|
||||
CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
|
||||
else()
|
||||
message(WARNING "Unsupported value of LLVM_USE_SANITIZER: ${LLVM_USE_SANITIZER}")
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user