-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Revisit fix_is_ci_llvm_available logic #107234
Merged
bors
merged 1 commit into
rust-lang:master
from
Rattenkrieg:bootstrap-fix-is_ci_llvm_available
Jan 27, 2023
Merged
Changes from all commits
Commits
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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -180,43 +180,40 @@ pub(crate) fn is_ci_llvm_available(config: &Config, asserts: bool) -> bool { | |
// https://doc.rust-lang.org/rustc/platform-support.html#tier-1 | ||
let supported_platforms = [ | ||
// tier 1 | ||
"aarch64-unknown-linux-gnu", | ||
"i686-pc-windows-gnu", | ||
"i686-pc-windows-msvc", | ||
"i686-unknown-linux-gnu", | ||
"x86_64-unknown-linux-gnu", | ||
"x86_64-apple-darwin", | ||
"x86_64-pc-windows-gnu", | ||
"x86_64-pc-windows-msvc", | ||
("aarch64-unknown-linux-gnu", false), | ||
("i686-pc-windows-gnu", false), | ||
("i686-pc-windows-msvc", false), | ||
("i686-unknown-linux-gnu", false), | ||
("x86_64-unknown-linux-gnu", true), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. First five are if (triple == "aarch64-unknown-linux-gnu" || triple.contains("i686")) && asserts {
return false
} |
||
("x86_64-apple-darwin", true), | ||
("x86_64-pc-windows-gnu", true), | ||
("x86_64-pc-windows-msvc", true), | ||
// tier 2 with host tools | ||
"aarch64-apple-darwin", | ||
"aarch64-pc-windows-msvc", | ||
"aarch64-unknown-linux-musl", | ||
"arm-unknown-linux-gnueabi", | ||
"arm-unknown-linux-gnueabihf", | ||
"armv7-unknown-linux-gnueabihf", | ||
"mips-unknown-linux-gnu", | ||
"mips64-unknown-linux-gnuabi64", | ||
"mips64el-unknown-linux-gnuabi64", | ||
"mipsel-unknown-linux-gnu", | ||
"powerpc-unknown-linux-gnu", | ||
"powerpc64-unknown-linux-gnu", | ||
"powerpc64le-unknown-linux-gnu", | ||
"riscv64gc-unknown-linux-gnu", | ||
"s390x-unknown-linux-gnu", | ||
"x86_64-unknown-freebsd", | ||
"x86_64-unknown-illumos", | ||
"x86_64-unknown-linux-musl", | ||
"x86_64-unknown-netbsd", | ||
("aarch64-apple-darwin", false), | ||
("aarch64-pc-windows-msvc", false), | ||
("aarch64-unknown-linux-musl", false), | ||
("arm-unknown-linux-gnueabi", false), | ||
("arm-unknown-linux-gnueabihf", false), | ||
("armv7-unknown-linux-gnueabihf", false), | ||
("mips-unknown-linux-gnu", false), | ||
("mips64-unknown-linux-gnuabi64", false), | ||
("mips64el-unknown-linux-gnuabi64", false), | ||
("mipsel-unknown-linux-gnu", false), | ||
("powerpc-unknown-linux-gnu", false), | ||
("powerpc64-unknown-linux-gnu", false), | ||
("powerpc64le-unknown-linux-gnu", false), | ||
("riscv64gc-unknown-linux-gnu", false), | ||
("s390x-unknown-linux-gnu", false), | ||
("x86_64-unknown-freebsd", false), | ||
("x86_64-unknown-illumos", false), | ||
("x86_64-unknown-linux-musl", false), | ||
("x86_64-unknown-netbsd", false), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No "llvm with asserts" artifacts are published for tier 2 with host tools. |
||
]; | ||
if !supported_platforms.contains(&&*config.build.triple) { | ||
return false; | ||
} | ||
|
||
let triple = &*config.build.triple; | ||
if (triple == "aarch64-unknown-linux-gnu" || triple.contains("i686")) && asserts { | ||
// No alt builder for aarch64-unknown-linux-gnu today. | ||
return false; | ||
if !supported_platforms.contains(&(&*config.build.triple, asserts)) { | ||
if asserts == true || !supported_platforms.contains(&(&*config.build.triple, true)) { | ||
return false; | ||
} | ||
} | ||
|
||
if CiEnv::is_ci() { | ||
|
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.
NB build triple wasn't read from result of
get_toml
. I don't know whether it was skipped deliberately or just simply forgotten. I'm leaning towards the latter, sincebuild.host
andbuild.target
are read below from the same toml.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.
probably accidental; https://github.com/rust-lang/rust/blob/8adbe6e436d7ae03dbb0e82729745e1e514eb508/src/bootstrap/config.rs#L815 gets it right because python sets it for https://github.com/rust-lang/rust/blob/8adbe6e436d7ae03dbb0e82729745e1e514eb508/src/bootstrap/build.rs#L4-L6 in https://github.com/rust-lang/rust/blob/8adbe6e436d7ae03dbb0e82729745e1e514eb508/src/bootstrap/bootstrap.py#L788-L797, so likely no one ever noticed.
I think it shouldn't ever matter in practice; even when we stop using python (#94829) the shell scripts should still respect
build.build
in config.toml, but changing it to make things testable seems good 👍