[libc-commits] [libc] cc84a14 - [libc] fix getchar_unlocked (#73874)

via libc-commits libc-commits at lists.llvm.org
Thu Nov 30 12:38:07 PST 2023


Author: Nick Desaulniers
Date: 2023-11-30T12:38:00-08:00
New Revision: cc84a1419723fcc240c3c6832bdb990afef37f4b

URL: https://github.com/llvm/llvm-project/commit/cc84a1419723fcc240c3c6832bdb990afef37f4b
DIFF: https://github.com/llvm/llvm-project/commit/cc84a1419723fcc240c3c6832bdb990afef37f4b.diff

LOG: [libc] fix getchar_unlocked (#73874)

A typo was leading to getc_unlocked.cpp.o being included into libc.a
twice.

I only noticed because I was trying to convert libc.a to a shared object
via

$ ld.lld -o libc.so --whole-archive libc.a

which errored since getc_unlocked was being defined twice.

Added: 
    

Modified: 
    libc/src/stdio/generic/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/libc/src/stdio/generic/CMakeLists.txt b/libc/src/stdio/generic/CMakeLists.txt
index 2ecef879eb4bbfe..4e4a709e94061b9 100644
--- a/libc/src/stdio/generic/CMakeLists.txt
+++ b/libc/src/stdio/generic/CMakeLists.txt
@@ -319,9 +319,9 @@ add_entrypoint_object(
 add_entrypoint_object(
   getchar_unlocked
   SRCS
-    getc_unlocked.cpp
+    getchar_unlocked.cpp
   HDRS
-    ../getc_unlocked.h
+    ../getchar_unlocked.h
   DEPENDS
     libc.src.errno.errno
     libc.include.stdio


        


More information about the libc-commits mailing list