[libc-commits] [PATCH] D152190: [CMake][libc] Don't put archive in build/lib/<target triple> by default
Aiden Grossman via Phabricator via libc-commits
libc-commits at lists.llvm.org
Mon Jun 5 17:44:49 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG14a06b806e3c: [CMake][libc] Don't put archive in build/lib/<target triple> by default (authored by aidengrossman).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152190/new/
https://reviews.llvm.org/D152190
Files:
libc/CMakeLists.txt
Index: libc/CMakeLists.txt
===================================================================
--- libc/CMakeLists.txt
+++ libc/CMakeLists.txt
@@ -17,10 +17,14 @@
# The top-level directory in which libc is being built.
set(LIBC_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})
-if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR)
+set(LIBC_ENABLE_USE_BY_CLANG OFF CACHE BOOL "Whether or not to place libc in a build directory findable by a just built clang")
+
+if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND LIBC_ENABLE_USE_BY_CLANG)
set(LIBC_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
else()
- if(LLVM_LIBRARY_OUTPUT_INTDIR)
+ if(NOT LIBC_ENABLE_USE_BY_CLANG)
+ set(LIBC_LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
+ elseif(LLVM_LIBRARY_OUTPUT_INTDIR)
set(LIBC_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
else()
set(LIBC_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152190.528651.patch
Type: text/x-patch
Size: 906 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230606/d2870cff/attachment.bin>
More information about the libc-commits
mailing list