Assorted bootstrap LLVM refactors (part 3/N) - #161247
Open
Kobzol wants to merge 2 commits into
Open
Conversation
Collaborator
|
This PR changes how LLVM is built. Consider updating src/bootstrap/download-ci-llvm-stamp. |
Collaborator
|
|
fbstj
reviewed
Aug 17, 2026
This comment has been minimized.
This comment has been minimized.
And explicitly depend on building the host LLVM when we need to invoke its `llvm-config` binary.
Kobzol
force-pushed
the
bootstrap-llvm-3
branch
from
August 17, 2026 17:37
953c4f0 to
cf840fa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Continuation of #160916.
This PR removes the
llvm_outfunction, and makes it explicit when we need to build the host LLVM.Before, bootstrap used to just arbitrarily run a
llvm-configbinary, even though it might not have been executable on the given host. Now, if we need to execute it, the host LLVM will always be explicitly built. It is possible that there are some cases where this will build LLVM where it didn't before, but that should only happen if you were on a target A, built LLVM for target B, and by sheer luck A could execute code for B (where A != B).In any case, it is now explicit, so if we encounter such situation, we can fix it without depending on implicit assumptions (well, there are still thousands of other assumptions, but you get my point).
After this, I'll work on centralizing the sanity checking of downloading LLVM inside the
LlvmFromCistep, which will allow us to log the exact reason whydownload-ci-llvmmight not have been applied, and also enable downloading LLVM from CI for non-host targets.r? jieyouxu