Skip to content

Commit 559cb6b

Browse files
committed
[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.
1 parent b9e25f6 commit 559cb6b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

libc/src/stdio/scanf_core/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ add_header_library(
5454
libc.src.__support.CPP.string_view
5555
)
5656

57-
if(NOT(TARGET libc.src.__support.File.file) AND LLVM_LIBC_FULL_BUILD)
57+
if(NOT(TARGET libc.src.__support.File.file) AND LLVM_LIBC_FULL_BUILD AND
58+
(NOT LIBC_TARGET_OS_IS_GPU))
5859
# Not all platforms have a file implementation. If file is unvailable, and a
5960
# full build is requested, then we must skip all file based scanf sections.
6061
return()

libc/test/src/stdio/scanf_core/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ add_libc_unittest(
1818
libc.src.__support.arg_list
1919
)
2020

21-
if(NOT(TARGET libc.src.__support.File.file) AND LLVM_LIBC_FULL_BUILD)
21+
if(NOT(TARGET libc.src.__support.File.file) AND LLVM_LIBC_FULL_BUILD AND
22+
(NOT LIBC_TARGET_OS_IS_GPU))
2223
# Not all platforms have a file implementation. If file is unvailable, and a
2324
# full build is requested, then we must skip all file based scanf sections.
2425
return()

0 commit comments

Comments
 (0)