Skip to content

Conversation

@boomanaiden154
Copy link
Contributor

When setting RUNTIMES_USE_LIBC=libc we pass -nostdlibinc if the compiler
supports it. This causes compilation failures when trying to build
libc++ as libc will try and reference kernel headers in its own headers
that it now cannot find. Explicitly reference the kernel headers so the
compiler can find them.

Created using spr 1.3.7
@boomanaiden154 boomanaiden154 requested a review from a team as a code owner October 25, 2025 19:39
@llvmbot llvmbot added the cmake Build system in general and CMake in particular label Oct 25, 2025
Created using spr 1.3.7
Copy link
Contributor

@michaelrj-google michaelrj-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@boomanaiden154 boomanaiden154 changed the title [Runtimes][libc] Include kernel headers when using RUNIMES_USE_LIBC [Runtimes][libc] Include kernel headers when using RUNTIMES_USE_LIBC Oct 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cmake Build system in general and CMake in particular

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants