[libc-commits] [libc] 857286f - [libc][NFC] Change the libc fullbuild target name to "libc".

Siva Chandra Reddy via libc-commits libc-commits at lists.llvm.org
Fri Aug 19 00:08:41 PDT 2022


Author: Siva Chandra Reddy
Date: 2022-08-19T07:07:30Z
New Revision: 857286f757ee6e4f8fe0e701f9957a4510af2d93

URL: https://github.com/llvm/llvm-project/commit/857286f757ee6e4f8fe0e701f9957a4510af2d93
DIFF: https://github.com/llvm/llvm-project/commit/857286f757ee6e4f8fe0e701f9957a4510af2d93.diff

LOG: [libc][NFC] Change the libc fullbuild target name to "libc".

Added: 
    

Modified: 
    libc/CMakeLists.txt
    libc/include/CMakeLists.txt
    libc/lib/CMakeLists.txt
    libc/test/src/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/libc/CMakeLists.txt b/libc/CMakeLists.txt
index 8aca93b2cf7cd..aaf4b153c3977 100644
--- a/libc/CMakeLists.txt
+++ b/libc/CMakeLists.txt
@@ -146,15 +146,17 @@ set(LIBC_COMPONENT)
 set(LIBC_INSTALL_DEPENDS)
 set(LIBC_INSTALL_TARGET)
 if(LLVM_LIBC_FULL_BUILD)
-  set(LIBC_TARGET c)
+  set(LIBC_TARGET libc)
   set(LIBC_COMPONENT libc)
-  set(LIBC_INSTALL_DEPENDS "c;libc-headers")
+  set(LIBC_INSTALL_DEPENDS "libc;libc-headers")
   set(LIBC_INSTALL_TARGET install-libc)
+  set(LIBC_ARCHIVE_NAME c)
 else()
   set(LIBC_TARGET llvmlibc)
   set(LIBC_COMPONENT llvmlibc)
   set(LIBC_INSTALL_DEPENDS llvmlibc)
   set(LIBC_INSTALL_TARGET install-llvmlibc)
+  set(LIBC_ARCHIVE_NAME llvmlibc)
 endif()
 
 add_subdirectory(include)

diff  --git a/libc/include/CMakeLists.txt b/libc/include/CMakeLists.txt
index cb420cc5524dd..78b4ee18ea0ba 100644
--- a/libc/include/CMakeLists.txt
+++ b/libc/include/CMakeLists.txt
@@ -221,7 +221,7 @@ add_gen_header(
     ../config/${LIBC_TARGET_OS}/syscall_numbers.h.inc
 )
 
-if(NOT LLVM_LIBC_FULLBUILD)
+if(NOT LLVM_LIBC_FULL_BUILD)
   # We don't install headers in non-fullbuild mode.
   return()
 endif()

diff  --git a/libc/lib/CMakeLists.txt b/libc/lib/CMakeLists.txt
index c5181e92a310c..b7eb0a133a17f 100644
--- a/libc/lib/CMakeLists.txt
+++ b/libc/lib/CMakeLists.txt
@@ -3,6 +3,11 @@ add_entrypoint_library(
   DEPENDS
   ${TARGET_LLVMLIBC_ENTRYPOINTS}
 )
+set_target_properties(
+  ${LIBC_TARGET}
+  PROPERTIES
+    ARCHIVE_OUTPUT_NAME ${LIBC_ARCHIVE_NAME}
+)
 
 if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR)
   set(LIBC_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE})

diff  --git a/libc/test/src/CMakeLists.txt b/libc/test/src/CMakeLists.txt
index e4a30c271fe8c..6d41c77b3b056 100644
--- a/libc/test/src/CMakeLists.txt
+++ b/libc/test/src/CMakeLists.txt
@@ -81,7 +81,7 @@ add_custom_command(
 
   DEPENDS ${LIBC_SOURCE_DIR}/config/${LIBC_TARGET_OS}/api.td ${spec_files}
           libc-prototype-testgen ${TARGET_PUBLIC_HEADERS}
-          c
+          ${LIBC_TARGET}
 )
 
 add_executable(
@@ -96,7 +96,7 @@ set_target_properties(
   PROPERTIES
   INCLUDE_DIRECTORIES ""
 )
-target_link_libraries(libc-api-test c)
+target_link_libraries(libc-api-test ${LIBC_TARGET})
 
 # Only include we need is the include for cpp::IsSame and our generated
 # public headers.


        


More information about the libc-commits mailing list