@@ -952,12 +952,17 @@ impl Config {
952
952
}
953
953
954
954
let dwn_ctx = DownloadContext :: from ( & config) ;
955
- config. download_rustc_commit = download_ci_rustc_commit (
956
- dwn_ctx,
957
- rust_download_rustc,
958
- debug_assertions_requested,
959
- config. llvm_assertions ,
960
- ) ;
955
+ config. download_rustc_commit =
956
+ download_ci_rustc_commit ( dwn_ctx, rust_download_rustc, config. llvm_assertions ) ;
957
+
958
+ if debug_assertions_requested {
959
+ eprintln ! (
960
+ "WARN: `rust.debug-assertions = true` will prevent downloading CI rustc as alt CI \
961
+ rustc is not currently built with debug assertions."
962
+ ) ;
963
+ // We need to put this later down_ci_rustc_commit.
964
+ config. download_rustc_commit = None ;
965
+ }
961
966
962
967
if let Some ( t) = toml. target {
963
968
for ( triple, cfg) in t {
@@ -1682,31 +1687,6 @@ impl Config {
1682
1687
update_submodule ( dwn_ctx, relative_path) ;
1683
1688
}
1684
1689
1685
- /// Returns the commit to download, or `None` if we shouldn't download CI artifacts.
1686
- pub fn download_ci_rustc_commit (
1687
- & self ,
1688
- download_rustc : Option < StringOrBool > ,
1689
- debug_assertions_requested : bool ,
1690
- llvm_assertions : bool ,
1691
- ) -> Option < String > {
1692
- let dwn_ctx = DownloadContext :: from ( self ) ;
1693
- download_ci_rustc_commit (
1694
- dwn_ctx,
1695
- download_rustc,
1696
- debug_assertions_requested,
1697
- llvm_assertions,
1698
- )
1699
- }
1700
-
1701
- pub fn parse_download_ci_llvm (
1702
- & self ,
1703
- download_ci_llvm : Option < StringOrBool > ,
1704
- asserts : bool ,
1705
- ) -> bool {
1706
- let dwn_ctx = DownloadContext :: from ( self ) ;
1707
- parse_download_ci_llvm ( dwn_ctx, download_ci_llvm, asserts)
1708
- }
1709
-
1710
1690
/// Returns true if any of the `paths` have been modified locally.
1711
1691
pub fn has_changes_from_upstream ( & self , paths : & [ & ' static str ] ) -> bool {
1712
1692
let dwn_ctx = DownloadContext :: from ( self ) ;
@@ -1731,10 +1711,6 @@ impl Config {
1731
1711
. clone ( )
1732
1712
}
1733
1713
1734
- pub fn ci_env ( & self ) -> CiEnv {
1735
- if self . is_running_on_ci { CiEnv :: GitHubActions } else { CiEnv :: None }
1736
- }
1737
-
1738
1714
pub fn sanitizers_enabled ( & self , target : TargetSelection ) -> bool {
1739
1715
self . target_config . get ( & target) . and_then ( |t| t. sanitizers ) . unwrap_or ( self . sanitizers )
1740
1716
}
@@ -2114,7 +2090,6 @@ pub fn check_stage0_version(
2114
2090
pub fn download_ci_rustc_commit < ' a > (
2115
2091
dwn_ctx : impl AsRef < DownloadContext < ' a > > ,
2116
2092
download_rustc : Option < StringOrBool > ,
2117
- debug_assertions_requested : bool ,
2118
2093
llvm_assertions : bool ,
2119
2094
) -> Option < String > {
2120
2095
let dwn_ctx = dwn_ctx. as_ref ( ) ;
@@ -2182,14 +2157,6 @@ pub fn download_ci_rustc_commit<'a>(
2182
2157
. expect ( "git-commit-info is missing in the project root" )
2183
2158
} ;
2184
2159
2185
- if debug_assertions_requested {
2186
- eprintln ! (
2187
- "WARN: `rust.debug-assertions = true` will prevent downloading CI rustc as alt CI \
2188
- rustc is not currently built with debug assertions."
2189
- ) ;
2190
- return None ;
2191
- }
2192
-
2193
2160
Some ( commit)
2194
2161
}
2195
2162
0 commit comments