[compiler-rt] [llvm] [LLVM][compiler-rt] Fix build with LLVM_USE_SANITIZER=Undefined (PR #120006)
Jon Roelofs via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 16 08:23:19 PST 2024
================
@@ -1064,7 +1064,8 @@ if(LLVM_USE_SANITIZER)
if (LLVM_USE_SANITIZE_COVERAGE)
append("-fsanitize=fuzzer-no-link" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
endif()
- if (LLVM_USE_SANITIZER MATCHES ".*Undefined.*")
+ if (LLVM_USE_SANITIZER MATCHES ".*Undefined.*" AND CMAKE_C_COMPILER_ID MATCHES "Clang" AND
+ CMAKE_CXX_COMPILER_ID MATCHES "Clang")
----------------
jroelofs wrote:
ohh, I think it would help a lot to put that concept in a variable, e.g:
```
check_cxx_compiler_flag(-fsanitize-blacklist=${IGNORELIST_FILE} COMPILER_RT_CXX_SUPPORTS_FSANITIZE_BLACKLIST)
```
instead of tying this to the specific compiler.
https://github.com/llvm/llvm-project/pull/120006
More information about the llvm-commits
mailing list