File tree 2 files changed +6
-7
lines changed
src/bootstrap/src/core/config
2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -2738,6 +2738,8 @@ impl Config {
2738
2738
download_ci_llvm : Option < StringOrBool > ,
2739
2739
asserts : bool ,
2740
2740
) -> bool {
2741
+ let download_ci_llvm = download_ci_llvm. unwrap_or ( StringOrBool :: Bool ( true ) ) ;
2742
+
2741
2743
let if_unchanged = || {
2742
2744
if self . rust_info . is_from_tarball ( ) {
2743
2745
// Git is needed for running "if-unchanged" logic.
@@ -2761,10 +2763,7 @@ impl Config {
2761
2763
} ;
2762
2764
2763
2765
match download_ci_llvm {
2764
- None => {
2765
- ( self . channel == "dev" || self . download_rustc_commit . is_some ( ) ) && if_unchanged ( )
2766
- }
2767
- Some ( StringOrBool :: Bool ( b) ) => {
2766
+ StringOrBool :: Bool ( b) => {
2768
2767
if !b && self . download_rustc_commit . is_some ( ) {
2769
2768
panic ! (
2770
2769
"`llvm.download-ci-llvm` cannot be set to `false` if `rust.download-rustc` is set to `true` or `if-unchanged`."
@@ -2774,8 +2773,8 @@ impl Config {
2774
2773
// If download-ci-llvm=true we also want to check that CI llvm is available
2775
2774
b && llvm:: is_ci_llvm_available ( self , asserts)
2776
2775
}
2777
- Some ( StringOrBool :: String ( s) ) if s == "if-unchanged" => if_unchanged ( ) ,
2778
- Some ( StringOrBool :: String ( other) ) => {
2776
+ StringOrBool :: String ( s) if s == "if-unchanged" => if_unchanged ( ) ,
2777
+ StringOrBool :: String ( other) => {
2779
2778
panic ! ( "unrecognized option for download-ci-llvm: {:?}" , other)
2780
2779
}
2781
2780
}
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ fn download_ci_llvm() {
32
32
assert ! ( !parse_llvm( "llvm.download-ci-llvm = false" ) ) ;
33
33
assert_eq ! ( parse_llvm( "" ) , if_unchanged) ;
34
34
assert_eq ! ( parse_llvm( "rust.channel = \" dev\" " ) , if_unchanged) ;
35
- assert ! ( ! parse_llvm( "rust.channel = \" stable\" " ) ) ;
35
+ assert ! ( parse_llvm( "rust.channel = \" stable\" " ) ) ;
36
36
assert_eq ! ( parse_llvm( "build.build = \" x86_64-unknown-linux-gnu\" " ) , if_unchanged) ;
37
37
assert_eq ! (
38
38
parse_llvm(
You can’t perform that action at this time.
0 commit comments