1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00

[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:
Petr Hosek 2020-03-06 14:38:07 -08:00
parent ebfa474806
commit 2167a77f9f

View File

@ -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)