From 6ce341de249c3858802a6f5b1559b2d143b0667d Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Mon, 14 Nov 2022 14:58:19 -0600 Subject: [PATCH] [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 --- llvm/runtimes/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt index facbecc5d34a..2c02a7ca843b 100644 --- a/llvm/runtimes/CMakeLists.txt +++ b/llvm/runtimes/CMakeLists.txt @@ -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)