[libc-commits] [libc] [libc] fix dependencies for fprintf (PR #98752)

via libc-commits libc-commits at lists.llvm.org
Sat Jul 13 10:33:58 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Schrodinger ZHU Yifan (SchrodingerZhu)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/98752.diff


1 Files Affected:

- (modified) libc/src/stdio/generic/CMakeLists.txt (+12-4) 


``````````diff
diff --git a/libc/src/stdio/generic/CMakeLists.txt b/libc/src/stdio/generic/CMakeLists.txt
index fdb0716f924d..bf301a6b0cb3 100644
--- a/libc/src/stdio/generic/CMakeLists.txt
+++ b/libc/src/stdio/generic/CMakeLists.txt
@@ -363,16 +363,24 @@ add_entrypoint_object(
     libc.src.__support.File.platform_file
 )
 
-list(APPEND printf_deps
+list(APPEND fprintf_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
+  list(APPEND fprintf_deps
       libc.src.__support.File.file
       libc.src.__support.File.platform_file
+  )
+endif()
+
+# Copy the deps for printf_deps
+set(printf_deps ${fprintf_deps})
+
+if(LLVM_LIBC_FULL_BUILD)
+  list(APPEND printf_deps
       libc.src.__support.File.platform_stdout
   )
 endif()
@@ -404,7 +412,7 @@ add_entrypoint_object(
   HDRS
     ../fprintf.h
   DEPENDS
-    ${printf_deps}
+    ${fprintf_deps}
 )
 
 add_entrypoint_object(
@@ -414,7 +422,7 @@ add_entrypoint_object(
   HDRS
     ../vfprintf.h
   DEPENDS
-    ${printf_deps}
+    ${fprintf_deps}
 )
 
 add_entrypoint_object(

``````````

</details>


https://github.com/llvm/llvm-project/pull/98752


More information about the libc-commits mailing list