Skip to content

Commit 1f9e27c

Browse files
Attempt to fix linker error
From: https://github.com/llvm/llvm-project/actions/runs/12518682283/job/34921546556?pr=121215 Error was: ``` /usr/bin/ld: libc/src/stdio/scanf_core/CMakeFiles/libc.src.stdio.scanf_core.reader.dir/./reader.cpp.o: in function `__llvm_libc_20_0_0_git::scanf_core::Reader::getc()': reader.cpp:(.text._ZN22__llvm_libc_20_0_0_git10scanf_core6Reader4getcEv+0x38): undefined reference to `__llvm_libc_20_0_0_git::File::read_unlocked(void*, unsigned long)' /usr/bin/ld: libc/src/stdio/scanf_core/CMakeFiles/libc.src.stdio.scanf_core.reader.dir/./reader.cpp.o: in function `__llvm_libc_20_0_0_git::scanf_core::Reader::ungetc(char)': reader.cpp:(.text._ZN22__llvm_libc_20_0_0_git10scanf_core6Reader6ungetcEc+0x2c): undefined reference to `__llvm_libc_20_0_0_git::File::ungetc_unlocked(int)' /usr/bin/ld: libc/test/src/stdio/libc.test.src.stdio.sscanf_test.__unit__.__build__: hidden symbol `_ZN22__llvm_libc_20_0_0_git4File13read_unlockedEPvm' isn't defined /usr/bin/ld: final link failed: bad value clang++: error: linker command failed with exit code 1 (use -v to see invocation) ```
1 parent 90ce1b2 commit 1f9e27c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libc/src/stdio/scanf_core/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ add_object_library(
6262
reader.h
6363
DEPENDS
6464
libc.src.__support.macros.attributes
65+
libc.hdr.types.FILE
6566
)
6667

6768
add_object_library(

0 commit comments

Comments
 (0)