1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

[HWASAN][CMake] Allow instrumenting LLVM/clang

Differential revision: https://reviews.llvm.org/D62813

llvm-svn: 362474
This commit is contained in:
Eugene Leviant 2019-06-04 09:04:53 +00:00
parent 0962ef7930
commit 01c4e6c46e

View File

@ -697,6 +697,9 @@ if(LLVM_USE_SANITIZER)
if (LLVM_USE_SANITIZER STREQUAL "Address")
append_common_sanitizer_flags()
append("-fsanitize=address" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
elseif (LLVM_USE_SANITIZER STREQUAL "HWAddress")
append_common_sanitizer_flags()
append("-fsanitize=hwaddress" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
elseif (LLVM_USE_SANITIZER MATCHES "Memory(WithOrigins)?")
append_common_sanitizer_flags()
append("-fsanitize=memory" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)