[llvm] [Runtimes][libc] Include kernel headers when using RUNTIMES_USE_LIBC (PR #165114)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 1 12:50:25 PDT 2025


boomanaiden154 wrote:

> LGTM, though you should probably double check how the cmake variable definition ordering works on this. LIBC_KERNEL_HEADERS is intended to be passed by the user but it also has a default value that might not get picked up on a fresh build

Ah, good point to check. We have to run it after `HandleLibC` is invoked because we need to tag this against the `runtime-libc-headers` target that is created there. The setup if `LIBC_KERNEL_HEADERS` happens pretty early in `libc/CMakeLists.txt`. Given `runtimes/CMakeLists.txt` explicitly handles ordering CMake configuration of the runtime libraries to respect layering rules, we'll have `LIBC_KERNEL_HEADERS` available whenever `HandleLibC` is invoked.

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


More information about the llvm-commits mailing list