diff --git a/libc/src/stdio/generic/CMakeLists.txt b/libc/src/stdio/generic/CMakeLists.txt index fdb0716f924d8..bf301a6b0cb3c 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(