move download_beta_toolchain out of impl as its used during config initialization
This commit is contained in:
parent
861de92f94
commit
8facd063f9
1 changed files with 25 additions and 0 deletions
|
|
@ -491,6 +491,31 @@ pub(crate) fn is_download_ci_available(target_triple: &str, llvm_assertions: boo
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) fn download_beta_toolchain<'a>(dwn_ctx: impl AsRef<DownloadContext<'a>>) {}
|
||||
|
||||
#[cfg(not(test))]
|
||||
pub(crate) fn download_beta_toolchain<'a>(dwn_ctx: impl AsRef<DownloadContext<'a>>) {
|
||||
let dwn_ctx = dwn_ctx.as_ref();
|
||||
if dwn_ctx.verbose {
|
||||
println!("downloading stage0 beta artifacts");
|
||||
}
|
||||
|
||||
let date = dwn_ctx.stage0_metadata.compiler.date.clone();
|
||||
let version = dwn_ctx.stage0_metadata.compiler.version.clone();
|
||||
let extra_components = ["cargo"];
|
||||
let sysroot = "stage0";
|
||||
download_toolchain(
|
||||
dwn_ctx,
|
||||
&version,
|
||||
sysroot,
|
||||
&date,
|
||||
&extra_components,
|
||||
"stage0",
|
||||
DownloadSource::Dist,
|
||||
);
|
||||
}
|
||||
|
||||
fn download_toolchain<'a>(
|
||||
dwn_ctx: impl AsRef<DownloadContext<'a>>,
|
||||
version: &str,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue