use build_helper::t;
use crate::builder::{Builder, Cargo as CargoCommand, RunConfig, ShouldRun, Step};
-use crate::cache::Interned;
use crate::channel;
use crate::channel::GitInfo;
use crate::compile;
+use crate::config::TargetSelection;
use crate::toolstate::ToolState;
use crate::util::{add_dylib_path, exe};
use crate::Compiler;
#[derive(Debug, Clone, Hash, PartialEq, Eq)]
struct ToolBuild {
compiler: Compiler,
- target: Interned<String>,
+ target: TargetSelection,
tool: &'static str,
path: &'static str,
mode: Mode,
.and_then(|p| p.file_name())
.and_then(|p| p.to_str())
.unwrap();
- if maybe_target != &*target {
+ if maybe_target != &*target.triple {
continue;
}
}
}
} else {
let cargo_out =
- builder.cargo_out(compiler, self.mode, target).join(exe(tool, &compiler.host));
- let bin = builder.tools_dir(compiler).join(exe(tool, &compiler.host));
+ builder.cargo_out(compiler, self.mode, target).join(exe(tool, compiler.host));
+ let bin = builder.tools_dir(compiler).join(exe(tool, compiler.host));
builder.copy(&cargo_out, &bin);
Some(bin)
}
builder: &Builder<'_>,
compiler: Compiler,
mode: Mode,
- target: Interned<String>,
+ target: TargetSelection,
command: &'static str,
path: &'static str,
source_type: SourceType,
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct $name {
pub compiler: Compiler,
- pub target: Interned<String>,
+ pub target: TargetSelection,
}
impl Step for $name {
Compiletest, "src/tools/compiletest", "compiletest", is_unstable_tool = true;
BuildManifest, "src/tools/build-manifest", "build-manifest";
RemoteTestClient, "src/tools/remote-test-client", "remote-test-client";
+ RustDemangler, "src/tools/rust-demangler", "rust-demangler";
RustInstaller, "src/tools/rust-installer", "fabricate", is_external_tool = true;
RustdocTheme, "src/tools/rustdoc-themes", "rustdoc-themes";
ExpandYamlAnchors, "src/tools/expand-yaml-anchors", "expand-yaml-anchors";
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct RemoteTestServer {
pub compiler: Compiler,
- pub target: Interned<String>,
+ pub target: TargetSelection,
}
impl Step for RemoteTestServer {
if !target_compiler.is_snapshot(builder) {
panic!("rustdoc in stage 0 must be snapshot rustdoc");
}
- return builder.initial_rustc.with_file_name(exe("rustdoc", &target_compiler.host));
+ return builder.initial_rustc.with_file_name(exe("rustdoc", target_compiler.host));
}
let target = target_compiler.host;
// Similar to `compile::Assemble`, build with the previous stage's compiler. Otherwise
// rustdoc a different name.
let tool_rustdoc = builder
.cargo_out(build_compiler, Mode::ToolRustc, target)
- .join(exe("rustdoc_tool_binary", &target_compiler.host));
+ .join(exe("rustdoc_tool_binary", target_compiler.host));
// don't create a stage0-sysroot/bin directory.
if target_compiler.stage > 0 {
let sysroot = builder.sysroot(target_compiler);
let bindir = sysroot.join("bin");
t!(fs::create_dir_all(&bindir));
- let bin_rustdoc = bindir.join(exe("rustdoc", &*target_compiler.host));
+ let bin_rustdoc = bindir.join(exe("rustdoc", target_compiler.host));
let _ = fs::remove_file(&bin_rustdoc);
builder.copy(&tool_rustdoc, &bin_rustdoc);
bin_rustdoc
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct Cargo {
pub compiler: Compiler,
- pub target: Interned<String>,
+ pub target: TargetSelection,
}
impl Step for Cargo {
#[derive(Debug, Clone, Hash, PartialEq, Eq)]
pub struct $name {
pub compiler: Compiler,
- pub target: Interned<String>,
+ pub target: TargetSelection,
pub extra_features: Vec<String>,
}