@@ -952,12 +952,17 @@ impl Config {
952952 }
953953
954954 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+ }
961966
962967 if let Some ( t) = toml. target {
963968 for ( triple, cfg) in t {
@@ -1682,31 +1687,6 @@ impl Config {
16821687 update_submodule ( dwn_ctx, relative_path) ;
16831688 }
16841689
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-
17101690 /// Returns true if any of the `paths` have been modified locally.
17111691 pub fn has_changes_from_upstream ( & self , paths : & [ & ' static str ] ) -> bool {
17121692 let dwn_ctx = DownloadContext :: from ( self ) ;
@@ -1731,10 +1711,6 @@ impl Config {
17311711 . clone ( )
17321712 }
17331713
1734- pub fn ci_env ( & self ) -> CiEnv {
1735- if self . is_running_on_ci { CiEnv :: GitHubActions } else { CiEnv :: None }
1736- }
1737-
17381714 pub fn sanitizers_enabled ( & self , target : TargetSelection ) -> bool {
17391715 self . target_config . get ( & target) . and_then ( |t| t. sanitizers ) . unwrap_or ( self . sanitizers )
17401716 }
@@ -2114,7 +2090,6 @@ pub fn check_stage0_version(
21142090pub fn download_ci_rustc_commit < ' a > (
21152091 dwn_ctx : impl AsRef < DownloadContext < ' a > > ,
21162092 download_rustc : Option < StringOrBool > ,
2117- debug_assertions_requested : bool ,
21182093 llvm_assertions : bool ,
21192094) -> Option < String > {
21202095 let dwn_ctx = dwn_ctx. as_ref ( ) ;
@@ -2182,14 +2157,6 @@ pub fn download_ci_rustc_commit<'a>(
21822157 . expect ( "git-commit-info is missing in the project root" )
21832158 } ;
21842159
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-
21932160 Some ( commit)
21942161}
21952162
0 commit comments