[libc-commits] [libc] 559cb6b - [libc] Fix scanf dependencies on the GPU build
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Sat Feb 22 11:14:32 PST 2025
Author: Joseph Huber
Date: 2025-02-22T13:14:20-06:00
New Revision: 559cb6ba631367f98728f3a29d0849618eadd1cb
URL: https://github.com/llvm/llvm-project/commit/559cb6ba631367f98728f3a29d0849618eadd1cb
DIFF: https://github.com/llvm/llvm-project/commit/559cb6ba631367f98728f3a29d0849618eadd1cb.diff
LOG: [libc] Fix scanf dependencies on the GPU build
Summary:
The GPU build doesn't have `file` as a struct but does use these
targets. We need to add an escape for this.
Added:
Modified:
libc/src/stdio/scanf_core/CMakeLists.txt
libc/test/src/stdio/scanf_core/CMakeLists.txt
Removed:
################################################################################
diff --git a/libc/src/stdio/scanf_core/CMakeLists.txt b/libc/src/stdio/scanf_core/CMakeLists.txt
index e8125ff465020..014413ccaa8da 100644
--- a/libc/src/stdio/scanf_core/CMakeLists.txt
+++ b/libc/src/stdio/scanf_core/CMakeLists.txt
@@ -54,7 +54,8 @@ add_header_library(
libc.src.__support.CPP.string_view
)
-if(NOT(TARGET libc.src.__support.File.file) AND LLVM_LIBC_FULL_BUILD)
+if(NOT(TARGET libc.src.__support.File.file) AND LLVM_LIBC_FULL_BUILD AND
+ (NOT LIBC_TARGET_OS_IS_GPU))
# Not all platforms have a file implementation. If file is unvailable, and a
# full build is requested, then we must skip all file based scanf sections.
return()
diff --git a/libc/test/src/stdio/scanf_core/CMakeLists.txt b/libc/test/src/stdio/scanf_core/CMakeLists.txt
index 9d05c7d4b89d1..058f665e42930 100644
--- a/libc/test/src/stdio/scanf_core/CMakeLists.txt
+++ b/libc/test/src/stdio/scanf_core/CMakeLists.txt
@@ -18,7 +18,8 @@ add_libc_unittest(
libc.src.__support.arg_list
)
-if(NOT(TARGET libc.src.__support.File.file) AND LLVM_LIBC_FULL_BUILD)
+if(NOT(TARGET libc.src.__support.File.file) AND LLVM_LIBC_FULL_BUILD AND
+ (NOT LIBC_TARGET_OS_IS_GPU))
# Not all platforms have a file implementation. If file is unvailable, and a
# full build is requested, then we must skip all file based scanf sections.
return()
More information about the libc-commits
mailing list