Skip to content

Commit f96e4e8

Browse files
[libc] fix dependencies for fprintf (#98752)
1 parent 6925849 commit f96e4e8

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

libc/src/stdio/generic/CMakeLists.txt

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -363,16 +363,24 @@ add_entrypoint_object(
363363
libc.src.__support.File.platform_file
364364
)
365365

366-
list(APPEND printf_deps
366+
list(APPEND fprintf_deps
367367
libc.hdr.types.FILE
368368
libc.src.__support.arg_list
369369
libc.src.stdio.printf_core.vfprintf_internal
370370
)
371371

372372
if(LLVM_LIBC_FULL_BUILD)
373-
list(APPEND printf_deps
373+
list(APPEND fprintf_deps
374374
libc.src.__support.File.file
375375
libc.src.__support.File.platform_file
376+
)
377+
endif()
378+
379+
# Copy the deps for printf_deps
380+
set(printf_deps ${fprintf_deps})
381+
382+
if(LLVM_LIBC_FULL_BUILD)
383+
list(APPEND printf_deps
376384
libc.src.__support.File.platform_stdout
377385
)
378386
endif()
@@ -404,7 +412,7 @@ add_entrypoint_object(
404412
HDRS
405413
../fprintf.h
406414
DEPENDS
407-
${printf_deps}
415+
${fprintf_deps}
408416
)
409417

410418
add_entrypoint_object(
@@ -414,7 +422,7 @@ add_entrypoint_object(
414422
HDRS
415423
../vfprintf.h
416424
DEPENDS
417-
${printf_deps}
425+
${fprintf_deps}
418426
)
419427

420428
add_entrypoint_object(

0 commit comments

Comments
 (0)