[PATCH] D137977: [libc] Forward LLVM_LIBC options when using a runtimes build

Joseph Huber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 14 13:03:14 PST 2022


jhuber6 created this revision.
jhuber6 added reviewers: sivachandra, lntue, michaelrj.
Herald added subscribers: ecnelises, tschuett.
Herald added a project: All.
jhuber6 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D137977

Files:
  llvm/runtimes/CMakeLists.txt


Index: llvm/runtimes/CMakeLists.txt
===================================================================
--- llvm/runtimes/CMakeLists.txt
+++ llvm/runtimes/CMakeLists.txt
@@ -178,6 +178,9 @@
   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)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137977.475252.patch
Type: text/x-patch
Size: 441 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221114/f75cf099/attachment.bin>


More information about the llvm-commits mailing list