mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01: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 llvm-svn: 228219
This commit is contained in:
parent
bef8a9c563
commit
774b1b57ed
@ -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