[llvm] 69186c5 - [libc][llvm] Forward `LIBC_` options as well in a runtime build

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 20 07:06:03 PST 2022


Author: Joseph Huber
Date: 2022-12-20T09:05:54-06:00
New Revision: 69186c52400cbb42ff485d851863ca2d5407f841

URL: https://github.com/llvm/llvm-project/commit/69186c52400cbb42ff485d851863ca2d5407f841
DIFF: https://github.com/llvm/llvm-project/commit/69186c52400cbb42ff485d851863ca2d5407f841.diff

LOG: [libc][llvm] Forward `LIBC_` options as well in a runtime build

Summary:
We need to forward certain CMake definitions to the runtimes build when
using `-DLLVM_ENABLE_RUNTIMES=libc`. The `libc` project uses both
`LLVM_LIBC` and `LIBC` prefixes. Previously we only forwarded
`LLVM_LIBC`. This patch adds the `LIBC_` prefix, using the underscore to
separate it from `LIBCXX`.

Added: 
    

Modified: 
    llvm/runtimes/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
index 5757c1c968fe..dea00753918b 100644
--- a/llvm/runtimes/CMakeLists.txt
+++ b/llvm/runtimes/CMakeLists.txt
@@ -180,6 +180,7 @@ foreach(entry ${runtimes})
   endif()
   if(canon_name STREQUAL "LLVMLIBC")
     list(APPEND prefixes "LLVM_LIBC")
+    list(APPEND prefixes "LIBC_")
   endif()
 
   string(FIND ${projName} "lib" LIB_IDX)


        


More information about the llvm-commits mailing list