-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Assorted bootstrap LLVM refactors (part 4/N) #161290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Kobzol
wants to merge
6
commits into
rust-lang:main
Choose a base branch
from
Kobzol:bootstrap-llvm-4
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6c317cc
Reduce usage of the `download_from_ci` function and rename it to `req…
Kobzol 7876a7b
Move `download-ci-llvm` `if-unchanged` detection logic into the `Llvm…
Kobzol 52b03b3
Allow downloading LLVM for arbitrary targets
Kobzol 9c1470a
Fix assertion for `download-ci-rustc`
Kobzol 9fb8083
Update comments and use `assert_matches!`
Kobzol 3a91281
Prefer externally configured `llvm-config` before `download-ci-llvm`
Kobzol File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm on board with option (4) but with a caveat:
download-ci-llvm = "if-unchanged") or if they explicitly specifieddownload-ci-llvm = "if-unchanged", then "try to download, build if missing" fallback feels reasonable.download-ci-llvm = true, we should fail the build if no CI LLVM is available.I think this matches what currently
download-ci-llvm = "if-unchanged"for host targets do?To clarify, I think what you mean here is for
download-ci-llvm = "if-unchanged"?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actualy, it doesn't :)
trueandif-unchangedare not different in this behavior currently. If you use either of them, and the given target is unavailable on CI, bootstrap will just build LLVM locally. It would seem surprising to me if those two modes had a different behavior in this specific aspect.rust/src/bootstrap/src/core/config/config.rs
Line 2489 in 287084b
rust/src/bootstrap/src/core/config/config.rs
Line 2513 in 287084b
(By the way, I'm considering merging those two modes together, same as we do for gcc. So that you only say
true, and if there are local changes, you would build. But if the LLVM submodule is checked out, you wouldn't check git changes, ofc.)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm... I guess that sometimes I do want to download-ci-llvm to fail the build if CI LLVM cannot be used for whatever reason and never checkout the llvm submodule. (In that, for specific cases like testing in-tree tools I prefer to fail the build rather than trying to recover.)
But yeah if this matches existing behavior then we can consider revisiting this behavior later.