Skip to content

Commit d21adb9

Browse files
committed
bootstrap: add rustc-dev install target
1 parent 29e035e commit d21adb9

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

src/bootstrap/src/core/build_steps/dist.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -892,8 +892,8 @@ impl Step for Std {
892892
#[derive(Debug, Clone, Hash, PartialEq, Eq)]
893893
pub struct RustcDev {
894894
/// The compiler that will build rustc which will be shipped in this component.
895-
build_compiler: Compiler,
896-
target: TargetSelection,
895+
pub build_compiler: Compiler,
896+
pub target: TargetSelection,
897897
}
898898

899899
impl RustcDev {

src/bootstrap/src/core/build_steps/install.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,17 @@ install!((self, builder, _config),
279279
});
280280
install_sh(builder, "rustc", self.build_compiler, Some(self.target), &tarball);
281281
};
282+
RustcDev, alias = "rustc-dev", Self::should_build(_config), IS_HOST: true, {
283+
if let Some(tarball) = builder.ensure(dist::RustcDev {
284+
build_compiler: self.build_compiler, target: self.target
285+
}) {
286+
install_sh(builder, "rustc-dev", self.build_compiler, Some(self.target), &tarball);
287+
} else {
288+
builder.info(
289+
&format!("skipping Install RustcDev stage{} ({})", self.build_compiler.stage + 1, self.target),
290+
);
291+
}
292+
};
282293
RustcCodegenCranelift, alias = "rustc-codegen-cranelift", Self::should_build(_config), IS_HOST: true, {
283294
if let Some(tarball) = builder.ensure(dist::CraneliftCodegenBackend {
284295
compilers: RustcPrivateCompilers::from_build_compiler(builder, self.build_compiler, self.target),

src/bootstrap/src/core/builder/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -998,6 +998,7 @@ impl<'a> Builder<'a> {
998998
// binary path, we must install rustc before the tools. Otherwise, the rust-installer will
999999
// install the same binaries twice for each tool, leaving backup files (*.old) as a result.
10001000
install::Rustc,
1001+
install::RustcDev,
10011002
install::Cargo,
10021003
install::RustAnalyzer,
10031004
install::Rustfmt,

0 commit comments

Comments
 (0)