[all-commits] [llvm/llvm-project] 7db970: [libc] Add unistd overlay (#118882)

Tristan Ross via All-commits all-commits at lists.llvm.org
Mon Dec 9 15:59:55 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7db970fe4a0249234712ae6899d34b94260b09cd
      https://github.com/llvm/llvm-project/commit/7db970fe4a0249234712ae6899d34b94260b09cd
  Author: Tristan Ross <tristan.ross at midstall.com>
  Date:   2024-12-09 (Mon, 09 Dec 2024)

  Changed paths:
    M libc/hdr/CMakeLists.txt
    M libc/hdr/unistd_macros.h
    A libc/hdr/unistd_overlay.h
    M libc/src/unistd/dup.h
    M libc/src/unistd/dup2.h
    M libc/src/unistd/dup3.h
    M libc/src/unistd/fork.h
    M libc/src/unistd/ftruncate.h
    M libc/src/unistd/getcwd.h
    M libc/src/unistd/geteuid.h
    M libc/src/unistd/getopt.h
    M libc/src/unistd/getpid.h
    M libc/src/unistd/getppid.h
    M libc/src/unistd/getuid.h
    M libc/src/unistd/isatty.h
    M libc/src/unistd/link.h
    M libc/src/unistd/linux/ftruncate.cpp
    M libc/src/unistd/linux/lseek.cpp
    M libc/src/unistd/linux/sysconf.cpp
    M libc/src/unistd/linux/truncate.cpp
    M libc/src/unistd/lseek.h
    M libc/src/unistd/pread.h
    M libc/src/unistd/pwrite.h
    M libc/src/unistd/read.h
    M libc/src/unistd/readlink.h
    M libc/src/unistd/readlinkat.h
    M libc/src/unistd/swab.h
    M libc/src/unistd/symlink.h
    M libc/src/unistd/symlinkat.h
    M libc/src/unistd/syscall.h
    M libc/src/unistd/sysconf.h
    M libc/src/unistd/truncate.h
    M libc/src/unistd/write.h

  Log Message:
  -----------
  [libc] Add unistd overlay (#118882)

Fixes failures like this which I experienced:
```
FAILED: src/unistd/linux/CMakeFiles/libc.src.unistd.linux.read.dir/read.cpp.o
/nix/store/2r2xi5pbg29bsmqywsm5zgl8l7adky4i-gcc-wrapper-13.3.0/bin/g++ -DLIBC_NAMESPACE=__llvm_libc -D_DEBUG -I/build/libc-src-20.0.0-unstable-2024-12-05/libc -isystem /build/libc-src-20.0.0-unstable-2024-12-05/libc/build/include -g -std=gnu++17 -DLIBC_QSORT_IMPL=LIBC_QSORT_QUICK_SORT -DLIBC_ADD_NULL_CHECKS -DLIBC_COPT_PUBLIC_PACKAGING -MD -MT src/unistd/linux/CMakeFiles/libc.src.unistd.linux.read.dir/read.cpp.o -MF src/unistd/linux/CMakeFiles/libc.src.unistd.linux.read.dir/read.cpp.o.d -o src/unistd/linux/CMakeFiles/libc.src.unistd.linux.read.dir/read.cpp.o -c /build/libc-src-20.0.0-unstable-2024-12-05/libc/src/unistd/linux/read.cpp
次のファイルから読み込み:  /build/libc-src-20.0.0-unstable-2024-12-05/libc/src/__support/OSUtil/linux/syscall.h:13,
         次から読み込み:  /build/libc-src-20.0.0-unstable-2024-12-05/libc/src/__support/OSUtil/syscall.h:15,
         次から読み込み:  /build/libc-src-20.0.0-unstable-2024-12-05/libc/src/unistd/linux/read.cpp:11:
/build/libc-src-20.0.0-unstable-2024-12-05/libc/src/unistd/linux/read.cpp:20:29: エラー: ‘ssize_t __llvm_libc::read(int, void*, size_t)’ が外部シンボル ‘read’ の別名となっています
   20 | LLVM_LIBC_FUNCTION(ssize_t, read, (int fd, void *buf, size_t count)) {
      |                             ^~~~
/build/libc-src-20.0.0-unstable-2024-12-05/libc/src/__support/common.h:46:34: 備考: in definition of macro ‘LLVM_LIBC_FUNCTION_IMPL’
   46 |   decltype(LIBC_NAMESPACE::name) name [[gnu::alias(#name)]];                   \
      |                                  ^~~~
/build/libc-src-20.0.0-unstable-2024-12-05/libc/src/unistd/linux/read.cpp:20:1: 備考: in expansion of macro ‘LLVM_LIBC_FUNCTION’
   20 | LLVM_LIBC_FUNCTION(ssize_t, read, (int fd, void *buf, size_t count)) {
      | ^~~~~~~~~~~~~~~~~~
```



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list