[libc-commits] [libc] [libc] pipe(2) linux syscall wrapper and unittest (PR #85514)
via libc-commits
libc-commits at lists.llvm.org
Mon Mar 18 12:46:51 PDT 2024
================
@@ -264,6 +266,20 @@ def Linux : StandardSpec<"Linux"> {
]
>;
+ HeaderSpec UniStd = HeaderSpec<
+ "unistd.h",
+ [], // Macros
+ [Pipe2fdArrayT], // Types
+ [], // Enumerations
+ [
+ FunctionSpec<
+ "pipe2",
+ RetValSpec<IntType>,
+ [ArgSpec<Pipe2fdArrayT>, ArgSpec<IntType>]
----------------
muffpy wrote:
> To test the generated headers, you'll need to full build mode. You can use the following cmake command from our build bots:
>
> ```
> $ cmake ../llvm -GNinja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release "-DLLVM_ENABLE_PROJECTS=llvm;libc;clang;compiler-rt" -DLLVM_LIBC_INCLUDE_SCUDO=ON -DLLVM_LIBC_FULL_BUILD=ON
> $ ninja libc && ninja check-libc
> ```
I get the following linker error. I'm on an aarch64 Debian Linux box. Not sure why these symbols from my box. Do you know any way to add them?
```
2/3021] Linking CXX executable projects/libc/test/src/__support/libc.test.src.__support.blockstore_test.__hermetic__.__build__
FAILED: projects/libc/test/src/__support/libc.test.src.__support.blockstore_test.__hermetic__.__build__
: && /usr/bin/clang++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -nolibc -nostartfiles -nostdlib++ -static projects/libc/startup/linux/crt1.o projects/libc/test/src/__support/CMakeFiles/libc.test.src.__support.blockstore_test.__hermetic__.__build__.dir/blockstore_test.cpp.o -o projects/libc/test/src/__support/libc.test.src.__support.blockstore_test.__hermetic__.__build__ lib/libLibcTest.hermetic.a lib/libLibcHermeticTestSupport.hermetic.a projects/libc/test/src/__support/liblibc.test.src.__support.blockstore_test.__hermetic__.libc.a && :
/usr/bin/ld: /usr/bin/../lib/gcc/aarch64-linux-gnu/12/libgcc.a(lse-init.o): in function `init_have_lse_atomics':
(.text.startup+0xc): undefined reference to `__getauxval'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```
https://github.com/llvm/llvm-project/pull/85514
More information about the libc-commits
mailing list