[libc] Forward LLVM_LIBC options when using a runtimes build

The `LLVM_ENABLE_RUNTIMES' mode is commonly used to build runtimes that
depend on an up-to-date version of clang. Currently, `libc` uses some
internal variables that are not forwarded when building in this mode.
This patch forwards the relevent arguments beginning with `LLVM_LIBC` to
the build when built this way.

Reviewed By: tianshilei1992

Differential Revision: https://reviews.llvm.org/D137977
This commit is contained in:
Joseph Huber 2022-11-14 14:58:19 -06:00
parent 40edb8b4ab
commit 6ce341de24

View File

@ -178,6 +178,9 @@ foreach(entry ${runtimes})
if(canon_name STREQUAL "COMPILER_RT")
list(APPEND prefixes SANITIZER DARWIN)
endif()
if(canon_name STREQUAL "LLVMLIBC")
list(APPEND prefixes "LLVM_LIBC")
endif()
string(FIND ${projName} "lib" LIB_IDX)
if(LIB_IDX EQUAL 0)