forked from OSchip/llvm-project
[runtimes] When COMPILER_RT is enabled, consider SANITIZER prefixes
Currently we passthrough CMake variables based on project prefix, i.e. LIBCXX_, LIBCXXABI_, LIBUNWIND_ and COMPILER_RT_. However, many compiler-rt flags start with SANITIZER_ rather than COMPILER_RT, so passthrough those as well. Differential Revision: https://reviews.llvm.org/D75773
This commit is contained in:
parent
e4e7e44765
commit
fe30eb6268
|
@ -333,6 +333,11 @@ else() # if this is included from LLVM's CMake
|
|||
string(REPLACE "-" "_" canon_name ${projName})
|
||||
string(TOUPPER ${canon_name} canon_name)
|
||||
list(APPEND prefixes ${canon_name})
|
||||
# Many compiler-rt options start with SANITIZER_ rather than COMPILER_RT_,
|
||||
# so when compiler-rt is enabled, consider both.
|
||||
if(canon_name STREQUAL "COMPILER_RT")
|
||||
list(APPEND prefixes SANITIZER)
|
||||
endif()
|
||||
|
||||
string(FIND ${projName} "lib" LIB_IDX)
|
||||
if(LIB_IDX EQUAL 0)
|
||||
|
|
Loading…
Reference in New Issue