[libc][llvm] Forward `LIBC_` options as well in a runtime build
authorJoseph Huber <jhuber6@vols.utk.edu>
Tue, 20 Dec 2022 15:02:24 +0000 (09:02 -0600)
committerJoseph Huber <jhuber6@vols.utk.edu>
Tue, 20 Dec 2022 15:05:54 +0000 (09:05 -0600)
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`.

llvm/runtimes/CMakeLists.txt

index 5757c1c..dea0075 100644 (file)
@@ -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)