Skip to content

[libc] fix dependencies for fprintf #98752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 13, 2024
Merged

Conversation

SchrodingerZhu
Copy link
Contributor

No description provided.

@SchrodingerZhu SchrodingerZhu requested a review from jhuber6 July 13, 2024 17:33
@llvmbot llvmbot added the libc label Jul 13, 2024
@llvmbot
Copy link
Member

llvmbot commented Jul 13, 2024

@llvm/pr-subscribers-libc

Author: Schrodinger ZHU Yifan (SchrodingerZhu)

Changes

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

1 Files Affected:

  • (modified) libc/src/stdio/generic/CMakeLists.txt (+12-4)
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(

@jhuber6 jhuber6 merged commit f96e4e8 into llvm:main Jul 13, 2024
6 of 7 checks passed
@SchrodingerZhu SchrodingerZhu deleted the libc/fprintf-fix branch July 14, 2024 03:30
aaryanshukla pushed a commit to aaryanshukla/llvm-project that referenced this pull request Jul 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants