[libc-commits] [libc] [libc][sched] Fix cpuset includes (PR #126303)
Nick Desaulniers via libc-commits
libc-commits at lists.llvm.org
Fri Feb 7 13:22:14 PST 2025
================
@@ -13,7 +13,7 @@
#include "src/__support/macros/config.h"
#include "src/errno/libc_errno.h"
-#include <sched.h>
+#include "hdr/types/cpu_set_t.h"
----------------
nickdesaulniers wrote:
Please also now include libc/hdr/types/pid_t.h, too! IWYU
and libc/hdr/types/size_t.h
Also need to express dependencies in cmake. Otherwise, in fullbuild mode, you have a race in the build system where potentially our include/llvm-libc-types/cpu_set_t.h hasn't been copied yet, and building this TU will fail. Expressing the dependency explicitly in CMakeLists.txt allows for cmake to build the correct dependency graph in order to avoid that race. Races suck, because sometimes it works, sometimes it doesn't.
https://github.com/llvm/llvm-project/pull/126303
More information about the libc-commits
mailing list