[libc-commits] [libc] 5949899 - [libc] Fix missing printf dependencies

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Fri Jul 12 18:42:15 PDT 2024


Author: Joseph Huber
Date: 2024-07-12T20:42:09-05:00
New Revision: 594989918bf9e178f3b7c5e200d700d0574f15ec

URL: https://github.com/llvm/llvm-project/commit/594989918bf9e178f3b7c5e200d700d0574f15ec
DIFF: https://github.com/llvm/llvm-project/commit/594989918bf9e178f3b7c5e200d700d0574f15ec.diff

LOG: [libc] Fix missing printf dependencies

Added: 
    

Modified: 
    libc/src/stdio/generic/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/libc/src/stdio/generic/CMakeLists.txt b/libc/src/stdio/generic/CMakeLists.txt
index a86b86a32dce7..fdb0716f924d8 100644
--- a/libc/src/stdio/generic/CMakeLists.txt
+++ b/libc/src/stdio/generic/CMakeLists.txt
@@ -363,6 +363,20 @@ add_entrypoint_object(
     libc.src.__support.File.platform_file
 )
 
+list(APPEND printf_deps
+      libc.hdr.types.FILE
+      libc.src.__support.arg_list
+      libc.src.stdio.printf_core.vfprintf_internal
+)
+
+if(LLVM_LIBC_FULL_BUILD)
+  list(APPEND printf_deps
+      libc.src.__support.File.file
+      libc.src.__support.File.platform_file
+      libc.src.__support.File.platform_stdout
+  )
+endif()
+
 add_entrypoint_object(
   printf
   SRCS
@@ -390,9 +404,6 @@ add_entrypoint_object(
   HDRS
     ../fprintf.h
   DEPENDS
-    libc.hdr.types.FILE
-    libc.src.__support.arg_list
-    libc.src.stdio.printf_core.vfprintf_internal
     ${printf_deps}
 )
 
@@ -403,9 +414,6 @@ add_entrypoint_object(
   HDRS
     ../vfprintf.h
   DEPENDS
-    libc.hdr.types.FILE
-    libc.src.__support.arg_list
-    libc.src.stdio.printf_core.vfprintf_internal
     ${printf_deps}
 )
 


        


More information about the libc-commits mailing list