[libc-commits] [libc] [libc] Additional check for File support in scanf_core (PR #128079)

Caslyn Tonelli via libc-commits libc-commits at lists.llvm.org
Thu Feb 20 14:16:33 PST 2025


https://github.com/Caslyn created https://github.com/llvm/llvm-project/pull/128079

This adds a check for `TARGET libc.src.__support.File.file` before appending ` libc.src.__support.File.file` to file_deps.

>From 148f309b51eb18232c86ce46165ecd5fc6a1ad8b Mon Sep 17 00:00:00 2001
From: Caslyn Tonelli <caslyn at google.com>
Date: Thu, 20 Feb 2025 14:12:23 -0800
Subject: [PATCH] [libc] Additional check for File support in scanf_core

This adds a check for `TARGET libc.src.__support.File.file` before
appending ` libc.src.__support.File.file` to file_deps.
---
 libc/src/stdio/scanf_core/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libc/src/stdio/scanf_core/CMakeLists.txt b/libc/src/stdio/scanf_core/CMakeLists.txt
index ce639fe65a106..813f4213d160a 100644
--- a/libc/src/stdio/scanf_core/CMakeLists.txt
+++ b/libc/src/stdio/scanf_core/CMakeLists.txt
@@ -16,7 +16,7 @@ if(LIBC_TARGET_OS_IS_GPU)
     libc.src.stdio.ungetc
     libc.src.stdio.ferror
   )
-elseif(LLVM_LIBC_FULL_BUILD)
+elseif(TARGET libc.src.__support.File.file AND LLVM_LIBC_FULL_BUILD)
   list(APPEND file_deps
     libc.src.__support.File.file
   )



More information about the libc-commits mailing list