The libc-hdergen tool is required for cross-builds, however some cases
can cause issues when configuring this build. This patch adds an
ovveride option LIBC_HDRGEN_ONLY to allow us to retain the old
(incorrect) behaviour where libc would not build with any other
runtimes enabled.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libc/CMakeLists.txt | ||
---|---|---|
32 | nit: having some parentheses here would help clarify what the actual condition is. |
Is libc-hdrgen the only target that's supposed to be built? I find it puzzling that LIBC_HDRGEN_ONLY enables/disables the same early return which is normally controlled by the runtime/project level knob. I mean -- it appears to enable way more than just libc-hdrgen.
When building with runtimes, we use the projects portion to just build the libc-hdrgen tool. So here the check is that if we have libc in the runtimes, but we're currently not doing a runtime build, then exit out early. This patch adds an extra way to assert that if we're building independently.
libc/CMakeLists.txt | ||
---|---|---|
32 | This is OK but add an option which is OFF by default. Its not clear to me that this how we have to the libc build. We are stretching the limits of what is formally supported because of what happens to work. |
nit: having some parentheses here would help clarify what the actual condition is.