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. |
src/bootstrap/native.rs
Outdated
There was a problem hiding this comment.
First five are false according to now removed
if (triple == "aarch64-unknown-linux-gnu" || triple.contains("i686")) && asserts {
return false
}
src/bootstrap/native.rs
Outdated
There was a problem hiding this comment.
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.
albertlarsan68
left a comment
There was a problem hiding this comment.
Just a nit, r=me when done and CI passes
src/bootstrap/config/tests.rs
Outdated
There was a problem hiding this comment.
| 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.
Got it! I'll get back to these tests later today, since there are formatting issues and adding build.build didn't help.
src/bootstrap/config.rs
Outdated
There was a problem hiding this comment.
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.
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_platformshas a knowledge whether llvm asserts artifacts are available for particular host triple.@jyn514 @albertlarsan68 PTAL