[libc-commits] [libc] [libc] check a few syscall #'s to avoid wrong syscalls (PR #123100)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Mon Feb 10 13:42:29 PST 2025


nickdesaulniers wrote:

I'm working on another patch to cmake to require setting `-DLIBC_KERNEL_HEADERS=` when `-DLIBC_TARGET_TRIPLE=` AND `-DLLVM_LIBC_FULL_BUILD=ON` is set.  The libc/libm can be cross compiled, but there's some issues with the test harness.

Setting:
```
$ cmake ../runtimes -GNinja -DLLVM_ENABLE_LLD=ON -DCMAKE_BUILD_TYPE=Debug -DLLVM_ENABLE_RUNTIMES="libc" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_LIBC_FULL_BUILD=ON -DLIBC_TARGET_TRIPLE=aarch64-linux-gnu -DCMAKE_CROSSCOMPILING_EMULATOR=qemu-aarch64 -DLIBC_KERNEL_HEADERS=/tmp/sysroot/include
```
is the goal.  I'll try to get the cmake changes up this week.  This PR is still a nice sanity check, but will kind of be obsoleted by the cmake changes. And it will make the check zero cost for users (which this approach in this PR is not).

https://github.com/llvm/llvm-project/pull/123100


More information about the libc-commits mailing list