[libc-commits] [libc] [libc][sched] Implement proxy headers for `cpu_set_t`, `struct sched_param` and `sched_macros`. (PR #126303)
Nick Desaulniers via libc-commits
libc-commits at lists.llvm.org
Thu Feb 13 10:44:35 PST 2025
nickdesaulniers wrote:
The presubmit failures are curious:
```
In file included from /home/runner/work/llvm-project/llvm-project/compiler-rt/lib/scudo/standalone/linux.cpp:23:
In file included from /usr/include/sched.h:34:
In file included from /home/runner/work/llvm-project/llvm-project/build/compiler-rt/../libc/include/time.h:18:
/home/runner/work/llvm-project/llvm-project/build/compiler-rt/../libc/include/llvm-libc-types/struct_timespec.h:14:8: error: redefinition of 'timespec'
14 | struct timespec {
| ^
/usr/include/aarch64-linux-gnu/bits/types/struct_timespec.h:11:8: note: previous definition is here
11 | struct timespec
| ^
```
So it looks like scudo is including <sched.h>, which is including the host's sched.h (not ours), which includes time.h (ours), which leads to the redefinition since ours collides with the hosts...
I wonder if something in the list of includes in compiler-rt/lib/scudo/standalone/linux.cpp is something we don't provide, so the build is falling back to using the host headers (for fullbuild, which is a hermeticity issue in llvm-libc's build!), which transitively include the host's struct_timespec.h somehow...
Probably going to have to run that compiler invocation with `-H` added, then sort through how struct_timespec.h from the host wound up getting included...
https://github.com/llvm/llvm-project/pull/126303
More information about the libc-commits
mailing list