From: Eugene Leviant Date: Tue, 4 Jun 2019 09:04:53 +0000 (+0000) Subject: [HWASAN][CMake] Allow instrumenting LLVM/clang X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e7dba02a1e600f86c82d6f76e35284cd110493b7;p=llvm [HWASAN][CMake] Allow instrumenting LLVM/clang Differential revision: https://reviews.llvm.org/D62813 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362474 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake index 80ef69f36e0..966a2b9294e 100644 --- a/cmake/modules/HandleLLVMOptions.cmake +++ b/cmake/modules/HandleLLVMOptions.cmake @@ -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)