Skip to content

Commit

Permalink
[libc] fix dependencies for fprintf (llvm#98752)
Browse files Browse the repository at this point in the history
  • Loading branch information
SchrodingerZhu committed Jul 13, 2024
1 parent 6925849 commit f96e4e8
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions libc/src/stdio/generic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -404,7 +412,7 @@ add_entrypoint_object(
HDRS
../fprintf.h
DEPENDS
${printf_deps}
${fprintf_deps}
)

add_entrypoint_object(
Expand All @@ -414,7 +422,7 @@ add_entrypoint_object(
HDRS
../vfprintf.h
DEPENDS
${printf_deps}
${fprintf_deps}
)

add_entrypoint_object(
Expand Down

0 comments on commit f96e4e8

Please sign in to comment.