-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Revisit fix_is_ci_llvm_available logic #107234
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ozkanonur (or someone else) soon. Please see the contribution instructions for more information. |
("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 comment
The reason will be displayed to describe this comment to others. Learn more.
First five are false
according to now removed
if (triple == "aarch64-unknown-linux-gnu" || triple.contains("i686")) && asserts {
return 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 comment
The 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.
r? @albertlarsan68 - feel free to ask if you want advice on the review :) |
This comment has been minimized.
This comment has been minimized.
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.
Just a nit, r=me when done and CI passes
src/bootstrap/config/tests.rs
Outdated
@@ -19,6 +19,8 @@ fn download_ci_llvm() { | |||
assert_eq!(parse_llvm(""), if_available); | |||
assert_eq!(parse_llvm("rust.channel = \"dev\""), if_available); | |||
assert!(!parse_llvm("rust.channel = \"stable\"")); | |||
assert!(parse_llvm("llvm.assertions = true \r\n build.build = \"x86_64-unknown-linux-gnu\" \r\n llvm.download-ci-llvm = \"if-available\"")); | |||
assert_eq!(parse_llvm("llvm.assertions = true \r\n build.build = \"aarch64-apple-darwin\" \r\n llvm.download-ci-llvm = \"if-available\""), false); |
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.
assert_eq!(parse_llvm("llvm.assertions = true \r\n build.build = \"aarch64-apple-darwin\" \r\n llvm.download-ci-llvm = \"if-available\""), false); | |
assert!(!parse_llvm("llvm.assertions = true \r\n build.build = \"aarch64-apple-darwin\" \r\n llvm.download-ci-llvm = \"if-available\"")); |
Asserting for false
should be done in this way rather than asserting equality with false
.
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.
Got it! I'll get back to these tests later today, since there are formatting issues and adding build.build
didn't help.
@@ -965,6 +965,9 @@ impl Config { | |||
config.changelog_seen = toml.changelog_seen; | |||
|
|||
let build = toml.build.unwrap_or_default(); | |||
if let Some(file_build) = build.build { | |||
config.build = TargetSelection::from_user(&file_build); | |||
}; |
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, since build.host
and build.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 👍
@albertlarsan68 is there anything else left for me to address? |
@Rattenkrieg Albert is on vacation until next week |
Got it, sorry, no rush then. |
I think this is good. Can you squash the commits please? Tip: post a comment containing @rustbot ready when you want another review, it puts the PR back into the to-do list of the reviewer. |
8adbe6e
to
9ef8407
Compare
@rustbot ready |
Thanks! |
…vm_available, r=albertlarsan68 Revisit fix_is_ci_llvm_available logic Fixes rust-lang#107225 Now `supported_platforms` has a knowledge whether llvm asserts artifacts are available for particular host triple. `@jyn514` `@albertlarsan68` PTAL
Rollup of 9 pull requests Successful merges: - rust-lang#106806 (Replace format flags u32 by enums and bools.) - rust-lang#107194 (Remove dependency on slice_internals feature in rustc_ast) - rust-lang#107234 (Revisit fix_is_ci_llvm_available logic) - rust-lang#107316 (Update snap from `1.0.1` to `1.1.0`) - rust-lang#107321 (solver comments + remove `TyCtxt::evaluate_goal`) - rust-lang#107332 (Fix wording from `rustbuild` to `bootstrap`) - rust-lang#107347 (reduce rightward-drift) - rust-lang#107352 (compiler: Fix E0587 explanation) - rust-lang#107357 (Fix infinite loop in rustdoc get_all_import_attributes function) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 9 pull requests Successful merges: - rust-lang#106806 (Replace format flags u32 by enums and bools.) - rust-lang#107194 (Remove dependency on slice_internals feature in rustc_ast) - rust-lang#107234 (Revisit fix_is_ci_llvm_available logic) - rust-lang#107316 (Update snap from `1.0.1` to `1.1.0`) - rust-lang#107321 (solver comments + remove `TyCtxt::evaluate_goal`) - rust-lang#107332 (Fix wording from `rustbuild` to `bootstrap`) - rust-lang#107347 (reduce rightward-drift) - rust-lang#107352 (compiler: Fix E0587 explanation) - rust-lang#107357 (Fix infinite loop in rustdoc get_all_import_attributes function) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes #107225
Now
supported_platforms
has a knowledge whether llvm asserts artifacts are available for particular host triple.@jyn514 @albertlarsan68 PTAL