Rollup merge of #145324 - Kobzol:bootstrap-host-only, r=jieyouxu
Rename and document `ONLY_HOSTS` in bootstrap Everytime I examined the `ONLY_HOSTS` flag of bootstrap steps, I was utterly confused. Why is it called ONLY_HOSTS? How does the fact that it is skipped if `--target` is passed, but `--host` is not (which was not accurate) help me? The reality of the flag is that if it is true, the targets for which the given Step will be built is determined based on the `--host` flag, while if it is false, it is determined based on the `--target` flag, that's pretty much it. The previous comment was just a (not very helpful and not even accurate) corollary of that. I clarified the comment, and also renamed the flag to `IS_HOST` (happy to brainstorm better names, but the doc. comment change is IMO the main improvement). r? ``@jieyouxu``
This commit is contained in:
commit
06246bfc73
14 changed files with 119 additions and 119 deletions
|
|
@ -172,7 +172,7 @@ impl Rustc {
|
|||
|
||||
impl Step for Rustc {
|
||||
type Output = ();
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
const DEFAULT: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
|
|
@ -324,7 +324,7 @@ pub struct CodegenBackend {
|
|||
|
||||
impl Step for CodegenBackend {
|
||||
type Output = ();
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
const DEFAULT: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
|
|
@ -410,7 +410,7 @@ macro_rules! tool_check_step {
|
|||
|
||||
impl Step for $name {
|
||||
type Output = ();
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
/// Most of the tool-checks using this macro are run by default.
|
||||
const DEFAULT: bool = true $( && $default )?;
|
||||
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ impl Rustc {
|
|||
|
||||
impl Step for Rustc {
|
||||
type Output = ();
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
const DEFAULT: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
|
|
|
|||
|
|
@ -959,7 +959,7 @@ impl Step for Rustc {
|
|||
/// uplifting it from stage Y, causing the other stage to fail when attempting to link with
|
||||
/// stage X which was never actually built.
|
||||
type Output = u32;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
const DEFAULT: bool = false;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
|
|
@ -1501,7 +1501,7 @@ pub struct GccCodegenBackend {
|
|||
impl Step for GccCodegenBackend {
|
||||
type Output = GccCodegenBackendOutput;
|
||||
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.alias("rustc_codegen_gcc").alias("cg_gcc")
|
||||
|
|
@ -1575,7 +1575,7 @@ pub struct CraneliftCodegenBackend {
|
|||
|
||||
impl Step for CraneliftCodegenBackend {
|
||||
type Output = BuildStamp;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.alias("rustc_codegen_cranelift").alias("cg_clif")
|
||||
|
|
@ -1919,7 +1919,7 @@ pub struct Assemble {
|
|||
|
||||
impl Step for Assemble {
|
||||
type Output = Compiler;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("compiler/rustc").path("compiler")
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ pub struct RustcDocs {
|
|||
impl Step for RustcDocs {
|
||||
type Output = Option<GeneratedTarball>;
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
let builder = run.builder;
|
||||
|
|
@ -402,7 +402,7 @@ pub struct Rustc {
|
|||
impl Step for Rustc {
|
||||
type Output = GeneratedTarball;
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.alias("rustc")
|
||||
|
|
@ -794,7 +794,7 @@ pub struct RustcDev {
|
|||
impl Step for RustcDev {
|
||||
type Output = Option<GeneratedTarball>;
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.alias("rustc-dev")
|
||||
|
|
@ -1024,7 +1024,7 @@ impl Step for Src {
|
|||
/// The output path of the src installer tarball
|
||||
type Output = GeneratedTarball;
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.alias("rust-src")
|
||||
|
|
@ -1085,7 +1085,7 @@ impl Step for PlainSourceTarball {
|
|||
/// Produces the location of the tarball generated
|
||||
type Output = GeneratedTarball;
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
let builder = run.builder;
|
||||
|
|
@ -1233,7 +1233,7 @@ pub struct Cargo {
|
|||
impl Step for Cargo {
|
||||
type Output = Option<GeneratedTarball>;
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
let default = should_build_extended_tool(run.builder, "cargo");
|
||||
|
|
@ -1287,7 +1287,7 @@ pub struct RustAnalyzer {
|
|||
impl Step for RustAnalyzer {
|
||||
type Output = Option<GeneratedTarball>;
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
let default = should_build_extended_tool(run.builder, "rust-analyzer");
|
||||
|
|
@ -1330,7 +1330,7 @@ pub struct Clippy {
|
|||
impl Step for Clippy {
|
||||
type Output = Option<GeneratedTarball>;
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
let default = should_build_extended_tool(run.builder, "clippy");
|
||||
|
|
@ -1378,7 +1378,7 @@ pub struct Miri {
|
|||
impl Step for Miri {
|
||||
type Output = Option<GeneratedTarball>;
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
let default = should_build_extended_tool(run.builder, "miri");
|
||||
|
|
@ -1428,7 +1428,7 @@ pub struct CraneliftCodegenBackend {
|
|||
impl Step for CraneliftCodegenBackend {
|
||||
type Output = Option<GeneratedTarball>;
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
// We only want to build the cranelift backend in `x dist` if the backend was enabled
|
||||
|
|
@ -1519,7 +1519,7 @@ pub struct Rustfmt {
|
|||
impl Step for Rustfmt {
|
||||
type Output = Option<GeneratedTarball>;
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
let default = should_build_extended_tool(run.builder, "rustfmt");
|
||||
|
|
@ -1564,7 +1564,7 @@ pub struct Extended {
|
|||
impl Step for Extended {
|
||||
type Output = ();
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
let builder = run.builder;
|
||||
|
|
@ -2301,7 +2301,7 @@ pub struct LlvmTools {
|
|||
|
||||
impl Step for LlvmTools {
|
||||
type Output = Option<GeneratedTarball>;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
const DEFAULT: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
|
|
@ -2406,7 +2406,7 @@ pub struct LlvmBitcodeLinker {
|
|||
impl Step for LlvmBitcodeLinker {
|
||||
type Output = Option<GeneratedTarball>;
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
let default = should_build_extended_tool(run.builder, "llvm-bitcode-linker");
|
||||
|
|
@ -2458,7 +2458,7 @@ pub struct RustDev {
|
|||
impl Step for RustDev {
|
||||
type Output = Option<GeneratedTarball>;
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.alias("rust-dev")
|
||||
|
|
@ -2561,7 +2561,7 @@ pub struct Bootstrap {
|
|||
impl Step for Bootstrap {
|
||||
type Output = Option<GeneratedTarball>;
|
||||
const DEFAULT: bool = false;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.alias("bootstrap")
|
||||
|
|
@ -2601,7 +2601,7 @@ pub struct BuildManifest {
|
|||
impl Step for BuildManifest {
|
||||
type Output = GeneratedTarball;
|
||||
const DEFAULT: bool = false;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.alias("build-manifest")
|
||||
|
|
@ -2633,7 +2633,7 @@ pub struct ReproducibleArtifacts {
|
|||
impl Step for ReproducibleArtifacts {
|
||||
type Output = Option<GeneratedTarball>;
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.alias("reproducible-artifacts")
|
||||
|
|
|
|||
|
|
@ -830,7 +830,7 @@ impl Rustc {
|
|||
impl Step for Rustc {
|
||||
type Output = ();
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
let builder = run.builder;
|
||||
|
|
@ -975,7 +975,7 @@ macro_rules! tool_doc {
|
|||
impl Step for $tool {
|
||||
type Output = ();
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
let builder = run.builder;
|
||||
|
|
@ -1139,7 +1139,7 @@ pub struct ErrorIndex {
|
|||
impl Step for ErrorIndex {
|
||||
type Output = ();
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
let builder = run.builder;
|
||||
|
|
@ -1181,7 +1181,7 @@ pub struct UnstableBookGen {
|
|||
impl Step for UnstableBookGen {
|
||||
type Output = ();
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
let builder = run.builder;
|
||||
|
|
@ -1248,7 +1248,7 @@ impl RustcBook {
|
|||
impl Step for RustcBook {
|
||||
type Output = ();
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
let builder = run.builder;
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ impl GccOutput {
|
|||
impl Step for Gcc {
|
||||
type Output = GccOutput;
|
||||
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/gcc").alias("gcc")
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ macro_rules! install {
|
|||
$($name:ident,
|
||||
$condition_name: ident = $path_or_alias: literal,
|
||||
$default_cond:expr,
|
||||
only_hosts: $only_hosts:expr,
|
||||
IS_HOST: $IS_HOST:expr,
|
||||
$run_item:block $(, $c:ident)*;)+) => {
|
||||
$(
|
||||
#[derive(Debug, Clone, Hash, PartialEq, Eq)]
|
||||
|
|
@ -183,7 +183,7 @@ macro_rules! install {
|
|||
impl Step for $name {
|
||||
type Output = ();
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = $only_hosts;
|
||||
const IS_HOST: bool = $IS_HOST;
|
||||
$(const $c: bool = true;)*
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
|
|
@ -206,11 +206,11 @@ macro_rules! install {
|
|||
}
|
||||
|
||||
install!((self, builder, _config),
|
||||
Docs, path = "src/doc", _config.docs, only_hosts: false, {
|
||||
Docs, path = "src/doc", _config.docs, IS_HOST: false, {
|
||||
let tarball = builder.ensure(dist::Docs { host: self.target }).expect("missing docs");
|
||||
install_sh(builder, "docs", self.compiler.stage, Some(self.target), &tarball);
|
||||
};
|
||||
Std, path = "library/std", true, only_hosts: false, {
|
||||
Std, path = "library/std", true, IS_HOST: false, {
|
||||
// `expect` should be safe, only None when host != build, but this
|
||||
// only runs when host == build
|
||||
let tarball = builder.ensure(dist::Std {
|
||||
|
|
@ -219,13 +219,13 @@ install!((self, builder, _config),
|
|||
}).expect("missing std");
|
||||
install_sh(builder, "std", self.compiler.stage, Some(self.target), &tarball);
|
||||
};
|
||||
Cargo, alias = "cargo", Self::should_build(_config), only_hosts: true, {
|
||||
Cargo, alias = "cargo", Self::should_build(_config), IS_HOST: true, {
|
||||
let tarball = builder
|
||||
.ensure(dist::Cargo { build_compiler: self.compiler, target: self.target })
|
||||
.expect("missing cargo");
|
||||
install_sh(builder, "cargo", self.compiler.stage, Some(self.target), &tarball);
|
||||
};
|
||||
RustAnalyzer, alias = "rust-analyzer", Self::should_build(_config), only_hosts: true, {
|
||||
RustAnalyzer, alias = "rust-analyzer", Self::should_build(_config), IS_HOST: true, {
|
||||
if let Some(tarball) =
|
||||
builder.ensure(dist::RustAnalyzer { build_compiler: self.compiler, target: self.target })
|
||||
{
|
||||
|
|
@ -236,13 +236,13 @@ install!((self, builder, _config),
|
|||
);
|
||||
}
|
||||
};
|
||||
Clippy, alias = "clippy", Self::should_build(_config), only_hosts: true, {
|
||||
Clippy, alias = "clippy", Self::should_build(_config), IS_HOST: true, {
|
||||
let tarball = builder
|
||||
.ensure(dist::Clippy { build_compiler: self.compiler, target: self.target })
|
||||
.expect("missing clippy");
|
||||
install_sh(builder, "clippy", self.compiler.stage, Some(self.target), &tarball);
|
||||
};
|
||||
Miri, alias = "miri", Self::should_build(_config), only_hosts: true, {
|
||||
Miri, alias = "miri", Self::should_build(_config), IS_HOST: true, {
|
||||
if let Some(tarball) = builder.ensure(dist::Miri { build_compiler: self.compiler, target: self.target }) {
|
||||
install_sh(builder, "miri", self.compiler.stage, Some(self.target), &tarball);
|
||||
} else {
|
||||
|
|
@ -252,7 +252,7 @@ install!((self, builder, _config),
|
|||
);
|
||||
}
|
||||
};
|
||||
LlvmTools, alias = "llvm-tools", _config.llvm_tools_enabled && _config.llvm_enabled(_config.host_target), only_hosts: true, {
|
||||
LlvmTools, alias = "llvm-tools", _config.llvm_tools_enabled && _config.llvm_enabled(_config.host_target), IS_HOST: true, {
|
||||
if let Some(tarball) = builder.ensure(dist::LlvmTools { target: self.target }) {
|
||||
install_sh(builder, "llvm-tools", self.compiler.stage, Some(self.target), &tarball);
|
||||
} else {
|
||||
|
|
@ -261,7 +261,7 @@ install!((self, builder, _config),
|
|||
);
|
||||
}
|
||||
};
|
||||
Rustfmt, alias = "rustfmt", Self::should_build(_config), only_hosts: true, {
|
||||
Rustfmt, alias = "rustfmt", Self::should_build(_config), IS_HOST: true, {
|
||||
if let Some(tarball) = builder.ensure(dist::Rustfmt {
|
||||
build_compiler: self.compiler,
|
||||
target: self.target
|
||||
|
|
@ -273,13 +273,13 @@ install!((self, builder, _config),
|
|||
);
|
||||
}
|
||||
};
|
||||
Rustc, path = "compiler/rustc", true, only_hosts: true, {
|
||||
Rustc, path = "compiler/rustc", true, IS_HOST: true, {
|
||||
let tarball = builder.ensure(dist::Rustc {
|
||||
compiler: builder.compiler(builder.top_stage, self.target),
|
||||
});
|
||||
install_sh(builder, "rustc", self.compiler.stage, Some(self.target), &tarball);
|
||||
};
|
||||
RustcCodegenCranelift, alias = "rustc-codegen-cranelift", Self::should_build(_config), only_hosts: true, {
|
||||
RustcCodegenCranelift, alias = "rustc-codegen-cranelift", Self::should_build(_config), IS_HOST: true, {
|
||||
if let Some(tarball) = builder.ensure(dist::CraneliftCodegenBackend {
|
||||
build_compiler: self.compiler,
|
||||
target: self.target
|
||||
|
|
@ -292,7 +292,7 @@ install!((self, builder, _config),
|
|||
);
|
||||
}
|
||||
};
|
||||
LlvmBitcodeLinker, alias = "llvm-bitcode-linker", Self::should_build(_config), only_hosts: true, {
|
||||
LlvmBitcodeLinker, alias = "llvm-bitcode-linker", Self::should_build(_config), IS_HOST: true, {
|
||||
if let Some(tarball) = builder.ensure(dist::LlvmBitcodeLinker { build_compiler: self.compiler, target: self.target }) {
|
||||
install_sh(builder, "llvm-bitcode-linker", self.compiler.stage, Some(self.target), &tarball);
|
||||
} else {
|
||||
|
|
@ -311,7 +311,7 @@ pub struct Src {
|
|||
impl Step for Src {
|
||||
type Output = ();
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
let config = &run.builder.config;
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ pub struct Llvm {
|
|||
impl Step for Llvm {
|
||||
type Output = LlvmResult;
|
||||
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/llvm-project").path("src/llvm-project/llvm")
|
||||
|
|
@ -897,7 +897,7 @@ pub struct Enzyme {
|
|||
|
||||
impl Step for Enzyme {
|
||||
type Output = PathBuf;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/tools/enzyme/enzyme")
|
||||
|
|
@ -993,7 +993,7 @@ pub struct Lld {
|
|||
|
||||
impl Step for Lld {
|
||||
type Output = PathBuf;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/llvm-project/lld")
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ pub struct BuildManifest;
|
|||
|
||||
impl Step for BuildManifest {
|
||||
type Output = ();
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/tools/build-manifest")
|
||||
|
|
@ -61,7 +61,7 @@ pub struct BumpStage0;
|
|||
|
||||
impl Step for BumpStage0 {
|
||||
type Output = ();
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/tools/bump-stage0")
|
||||
|
|
@ -83,7 +83,7 @@ pub struct ReplaceVersionPlaceholder;
|
|||
|
||||
impl Step for ReplaceVersionPlaceholder {
|
||||
type Output = ();
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/tools/replace-version-placeholder")
|
||||
|
|
@ -107,7 +107,6 @@ pub struct Miri {
|
|||
|
||||
impl Step for Miri {
|
||||
type Output = ();
|
||||
const ONLY_HOSTS: bool = false;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/tools/miri")
|
||||
|
|
@ -175,7 +174,7 @@ pub struct CollectLicenseMetadata;
|
|||
|
||||
impl Step for CollectLicenseMetadata {
|
||||
type Output = PathBuf;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/tools/collect-license-metadata")
|
||||
|
|
@ -206,7 +205,7 @@ pub struct GenerateCopyright;
|
|||
|
||||
impl Step for GenerateCopyright {
|
||||
type Output = Vec<PathBuf>;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/tools/generate-copyright")
|
||||
|
|
@ -270,7 +269,7 @@ pub struct GenerateWindowsSys;
|
|||
|
||||
impl Step for GenerateWindowsSys {
|
||||
type Output = ();
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/tools/generate-windows-sys")
|
||||
|
|
@ -332,7 +331,7 @@ pub struct UnicodeTableGenerator;
|
|||
|
||||
impl Step for UnicodeTableGenerator {
|
||||
type Output = ();
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/tools/unicode-table-generator")
|
||||
|
|
@ -354,7 +353,7 @@ pub struct FeaturesStatusDump;
|
|||
|
||||
impl Step for FeaturesStatusDump {
|
||||
type Output = ();
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/tools/features-status-dump")
|
||||
|
|
@ -416,7 +415,7 @@ impl Step for CoverageDump {
|
|||
type Output = ();
|
||||
|
||||
const DEFAULT: bool = false;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/tools/coverage-dump")
|
||||
|
|
@ -438,7 +437,7 @@ pub struct Rustfmt;
|
|||
|
||||
impl Step for Rustfmt {
|
||||
type Output = ();
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/tools/rustfmt")
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ pub(crate) struct MirOptPanicAbortSyntheticTarget {
|
|||
impl Step for MirOptPanicAbortSyntheticTarget {
|
||||
type Output = TargetSelection;
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = false;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.never()
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ pub struct CrateBootstrap {
|
|||
|
||||
impl Step for CrateBootstrap {
|
||||
type Output = ();
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
const DEFAULT: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
|
|
@ -107,7 +107,7 @@ pub struct Linkcheck {
|
|||
|
||||
impl Step for Linkcheck {
|
||||
type Output = ();
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
const DEFAULT: bool = true;
|
||||
|
||||
/// Runs the `linkchecker` tool as compiled in `stage` by the `host` compiler.
|
||||
|
|
@ -187,7 +187,7 @@ pub struct HtmlCheck {
|
|||
impl Step for HtmlCheck {
|
||||
type Output = ();
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
let builder = run.builder;
|
||||
|
|
@ -234,7 +234,7 @@ pub struct Cargotest {
|
|||
|
||||
impl Step for Cargotest {
|
||||
type Output = ();
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/tools/cargotest")
|
||||
|
|
@ -311,7 +311,7 @@ impl Cargo {
|
|||
|
||||
impl Step for Cargo {
|
||||
type Output = ();
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path(Self::CRATE_PATH)
|
||||
|
|
@ -408,7 +408,7 @@ pub struct RustAnalyzer {
|
|||
|
||||
impl Step for RustAnalyzer {
|
||||
type Output = ();
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
const DEFAULT: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
|
|
@ -467,7 +467,7 @@ pub struct Rustfmt {
|
|||
|
||||
impl Step for Rustfmt {
|
||||
type Output = ();
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/tools/rustfmt")
|
||||
|
|
@ -559,7 +559,6 @@ impl Miri {
|
|||
|
||||
impl Step for Miri {
|
||||
type Output = ();
|
||||
const ONLY_HOSTS: bool = false;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/tools/miri")
|
||||
|
|
@ -679,7 +678,6 @@ pub struct CargoMiri {
|
|||
|
||||
impl Step for CargoMiri {
|
||||
type Output = ();
|
||||
const ONLY_HOSTS: bool = false;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/tools/miri/cargo-miri")
|
||||
|
|
@ -805,7 +803,7 @@ pub struct Clippy {
|
|||
|
||||
impl Step for Clippy {
|
||||
type Output = ();
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
const DEFAULT: bool = false;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
|
|
@ -905,7 +903,7 @@ pub struct RustdocTheme {
|
|||
impl Step for RustdocTheme {
|
||||
type Output = ();
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/tools/rustdoc-themes")
|
||||
|
|
@ -942,7 +940,7 @@ pub struct RustdocJSStd {
|
|||
impl Step for RustdocJSStd {
|
||||
type Output = ();
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
let default = run.builder.config.nodejs.is_some();
|
||||
|
|
@ -1002,7 +1000,7 @@ pub struct RustdocJSNotStd {
|
|||
impl Step for RustdocJSNotStd {
|
||||
type Output = ();
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
let default = run.builder.config.nodejs.is_some();
|
||||
|
|
@ -1057,7 +1055,7 @@ pub struct RustdocGUI {
|
|||
impl Step for RustdocGUI {
|
||||
type Output = ();
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
let builder = run.builder;
|
||||
|
|
@ -1150,7 +1148,7 @@ pub struct Tidy;
|
|||
impl Step for Tidy {
|
||||
type Output = ();
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
/// Runs the `tidy` tool.
|
||||
///
|
||||
|
|
@ -1268,7 +1266,7 @@ macro_rules! test {
|
|||
mode: $mode:expr,
|
||||
suite: $suite:expr,
|
||||
default: $default:expr
|
||||
$( , only_hosts: $only_hosts:expr )? // default: false
|
||||
$( , IS_HOST: $IS_HOST:expr )? // default: false
|
||||
$( , compare_mode: $compare_mode:expr )? // default: None
|
||||
$( , )? // optional trailing comma
|
||||
}
|
||||
|
|
@ -1283,10 +1281,10 @@ macro_rules! test {
|
|||
impl Step for $name {
|
||||
type Output = ();
|
||||
const DEFAULT: bool = $default;
|
||||
const ONLY_HOSTS: bool = (const {
|
||||
const IS_HOST: bool = (const {
|
||||
#[allow(unused_assignments, unused_mut)]
|
||||
let mut value = false;
|
||||
$( value = $only_hosts; )?
|
||||
$( value = $IS_HOST; )?
|
||||
value
|
||||
});
|
||||
|
||||
|
|
@ -1334,7 +1332,7 @@ pub struct CrateRunMakeSupport {
|
|||
|
||||
impl Step for CrateRunMakeSupport {
|
||||
type Output = ();
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/tools/run-make-support")
|
||||
|
|
@ -1371,7 +1369,7 @@ pub struct CrateBuildHelper {
|
|||
|
||||
impl Step for CrateBuildHelper {
|
||||
type Output = ();
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/build_helper")
|
||||
|
|
@ -1439,7 +1437,7 @@ test!(UiFullDeps {
|
|||
mode: "ui",
|
||||
suite: "ui-fulldeps",
|
||||
default: true,
|
||||
only_hosts: true,
|
||||
IS_HOST: true,
|
||||
});
|
||||
|
||||
test!(Rustdoc {
|
||||
|
|
@ -1447,14 +1445,14 @@ test!(Rustdoc {
|
|||
mode: "rustdoc",
|
||||
suite: "rustdoc",
|
||||
default: true,
|
||||
only_hosts: true,
|
||||
IS_HOST: true,
|
||||
});
|
||||
test!(RustdocUi {
|
||||
path: "tests/rustdoc-ui",
|
||||
mode: "ui",
|
||||
suite: "rustdoc-ui",
|
||||
default: true,
|
||||
only_hosts: true,
|
||||
IS_HOST: true,
|
||||
});
|
||||
|
||||
test!(RustdocJson {
|
||||
|
|
@ -1462,7 +1460,7 @@ test!(RustdocJson {
|
|||
mode: "rustdoc-json",
|
||||
suite: "rustdoc-json",
|
||||
default: true,
|
||||
only_hosts: true,
|
||||
IS_HOST: true,
|
||||
});
|
||||
|
||||
test!(Pretty {
|
||||
|
|
@ -1470,7 +1468,7 @@ test!(Pretty {
|
|||
mode: "pretty",
|
||||
suite: "pretty",
|
||||
default: true,
|
||||
only_hosts: true,
|
||||
IS_HOST: true,
|
||||
});
|
||||
|
||||
test!(RunMake { path: "tests/run-make", mode: "run-make", suite: "run-make", default: true });
|
||||
|
|
@ -1501,7 +1499,7 @@ impl Step for Coverage {
|
|||
type Output = ();
|
||||
const DEFAULT: bool = true;
|
||||
/// Compiletest will automatically skip the "coverage-run" tests if necessary.
|
||||
const ONLY_HOSTS: bool = false;
|
||||
const IS_HOST: bool = false;
|
||||
|
||||
fn should_run(mut run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
// Support various invocation styles, including:
|
||||
|
|
@ -1580,7 +1578,7 @@ test!(CoverageRunRustdoc {
|
|||
mode: "coverage-run",
|
||||
suite: "coverage-run-rustdoc",
|
||||
default: true,
|
||||
only_hosts: true,
|
||||
IS_HOST: true,
|
||||
});
|
||||
|
||||
// For the mir-opt suite we do not use macros, as we need custom behavior when blessing.
|
||||
|
|
@ -1593,7 +1591,6 @@ pub struct MirOpt {
|
|||
impl Step for MirOpt {
|
||||
type Output = ();
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = false;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.suite_path("tests/mir-opt")
|
||||
|
|
@ -2270,7 +2267,7 @@ struct BookTest {
|
|||
|
||||
impl Step for BookTest {
|
||||
type Output = ();
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.never()
|
||||
|
|
@ -2436,7 +2433,7 @@ macro_rules! test_book {
|
|||
impl Step for $name {
|
||||
type Output = ();
|
||||
const DEFAULT: bool = $default;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path($path)
|
||||
|
|
@ -2496,7 +2493,7 @@ pub struct ErrorIndex {
|
|||
impl Step for ErrorIndex {
|
||||
type Output = ();
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
// Also add `error-index` here since that is what appears in the error message
|
||||
|
|
@ -2592,7 +2589,7 @@ pub struct CrateLibrustc {
|
|||
impl Step for CrateLibrustc {
|
||||
type Output = ();
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.crate_or_deps("rustc-main").path("compiler")
|
||||
|
|
@ -2877,7 +2874,7 @@ pub struct CrateRustdoc {
|
|||
impl Step for CrateRustdoc {
|
||||
type Output = ();
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.paths(&["src/librustdoc", "src/tools/rustdoc"])
|
||||
|
|
@ -2969,7 +2966,7 @@ pub struct CrateRustdocJsonTypes {
|
|||
impl Step for CrateRustdocJsonTypes {
|
||||
type Output = ();
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/rustdoc-json-types")
|
||||
|
|
@ -3158,7 +3155,7 @@ pub struct Bootstrap;
|
|||
impl Step for Bootstrap {
|
||||
type Output = ();
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
/// Tests the build system itself.
|
||||
fn run(self, builder: &Builder<'_>) {
|
||||
|
|
@ -3228,7 +3225,7 @@ pub struct TierCheck {
|
|||
impl Step for TierCheck {
|
||||
type Output = ();
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/tools/tier-check")
|
||||
|
|
@ -3282,7 +3279,7 @@ pub struct LintDocs {
|
|||
impl Step for LintDocs {
|
||||
type Output = ();
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/tools/lint-docs")
|
||||
|
|
@ -3308,7 +3305,7 @@ pub struct RustInstaller;
|
|||
|
||||
impl Step for RustInstaller {
|
||||
type Output = ();
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
const DEFAULT: bool = true;
|
||||
|
||||
/// Ensure the version placeholder replacement tool builds
|
||||
|
|
@ -3428,7 +3425,7 @@ pub struct CodegenCranelift {
|
|||
impl Step for CodegenCranelift {
|
||||
type Output = ();
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.paths(&["compiler/rustc_codegen_cranelift"])
|
||||
|
|
@ -3556,7 +3553,7 @@ pub struct CodegenGCC {
|
|||
impl Step for CodegenGCC {
|
||||
type Output = ();
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.paths(&["compiler/rustc_codegen_gcc"])
|
||||
|
|
@ -3689,7 +3686,7 @@ pub struct TestFloatParse {
|
|||
|
||||
impl Step for TestFloatParse {
|
||||
type Output = ();
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
const DEFAULT: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
|
|
@ -3755,7 +3752,7 @@ pub struct CollectLicenseMetadata;
|
|||
|
||||
impl Step for CollectLicenseMetadata {
|
||||
type Output = PathBuf;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/tools/collect-license-metadata")
|
||||
|
|
|
|||
|
|
@ -676,7 +676,7 @@ impl Step for Rustdoc {
|
|||
type Output = PathBuf;
|
||||
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/tools/rustdoc").path("src/librustdoc")
|
||||
|
|
@ -798,7 +798,7 @@ impl Cargo {
|
|||
impl Step for Cargo {
|
||||
type Output = ToolBuildResult;
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
let builder = run.builder;
|
||||
|
|
@ -874,7 +874,7 @@ impl LldWrapper {
|
|||
impl Step for LldWrapper {
|
||||
type Output = BuiltLldWrapper;
|
||||
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/tools/lld-wrapper")
|
||||
|
|
@ -966,7 +966,7 @@ impl WasmComponentLd {
|
|||
impl Step for WasmComponentLd {
|
||||
type Output = ToolBuildResult;
|
||||
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.path("src/tools/wasm-component-ld")
|
||||
|
|
@ -1020,7 +1020,7 @@ impl RustAnalyzer {
|
|||
impl Step for RustAnalyzer {
|
||||
type Output = ToolBuildResult;
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
let builder = run.builder;
|
||||
|
|
@ -1073,7 +1073,7 @@ impl Step for RustAnalyzerProcMacroSrv {
|
|||
type Output = ToolBuildResult;
|
||||
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
let builder = run.builder;
|
||||
|
|
@ -1163,7 +1163,7 @@ impl LlvmBitcodeLinker {
|
|||
impl Step for LlvmBitcodeLinker {
|
||||
type Output = ToolBuildResult;
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
let builder = run.builder;
|
||||
|
|
@ -1213,7 +1213,7 @@ pub enum LibcxxVersion {
|
|||
impl Step for LibcxxVersionTool {
|
||||
type Output = LibcxxVersion;
|
||||
const DEFAULT: bool = false;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.never()
|
||||
|
|
@ -1374,7 +1374,7 @@ macro_rules! tool_rustc_extended {
|
|||
impl Step for $name {
|
||||
type Output = ToolBuildResult;
|
||||
const DEFAULT: bool = true; // Overridden by `should_run_tool_build_step`
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
should_run_extended_rustc_tool(
|
||||
|
|
@ -1542,7 +1542,7 @@ impl TestFloatParse {
|
|||
|
||||
impl Step for TestFloatParse {
|
||||
type Output = ToolBuildResult;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
const DEFAULT: bool = false;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ pub(crate) struct Vendor {
|
|||
impl Step for Vendor {
|
||||
type Output = VendorOutput;
|
||||
const DEFAULT: bool = true;
|
||||
const ONLY_HOSTS: bool = true;
|
||||
const IS_HOST: bool = true;
|
||||
|
||||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||
run.alias("placeholder").default_condition(true)
|
||||
|
|
|
|||
|
|
@ -100,8 +100,13 @@ pub trait Step: 'static + Clone + Debug + PartialEq + Eq + Hash {
|
|||
/// by `Step::should_run`.
|
||||
const DEFAULT: bool = false;
|
||||
|
||||
/// If true, then this rule should be skipped if --target was specified, but --host was not
|
||||
const ONLY_HOSTS: bool = false;
|
||||
/// If this value is true, then the values of `run.target` passed to the `make_run` function of
|
||||
/// this Step will be determined based on the `--host` flag.
|
||||
/// If this value is false, then they will be determined based on the `--target` flag.
|
||||
///
|
||||
/// A corollary of the above is that if this is set to true, then the step will be skipped if
|
||||
/// `--target` was specified, but `--host` was explicitly set to '' (empty string).
|
||||
const IS_HOST: bool = false;
|
||||
|
||||
/// Primary function to implement `Step` logic.
|
||||
///
|
||||
|
|
@ -298,7 +303,7 @@ pub fn crate_description(crates: &[impl AsRef<str>]) -> String {
|
|||
|
||||
struct StepDescription {
|
||||
default: bool,
|
||||
only_hosts: bool,
|
||||
is_host: bool,
|
||||
should_run: fn(ShouldRun<'_>) -> ShouldRun<'_>,
|
||||
make_run: fn(RunConfig<'_>),
|
||||
name: &'static str,
|
||||
|
|
@ -500,7 +505,7 @@ impl StepDescription {
|
|||
fn from<S: Step>(kind: Kind) -> StepDescription {
|
||||
StepDescription {
|
||||
default: S::DEFAULT,
|
||||
only_hosts: S::ONLY_HOSTS,
|
||||
is_host: S::IS_HOST,
|
||||
should_run: S::should_run,
|
||||
make_run: S::make_run,
|
||||
name: std::any::type_name::<S>(),
|
||||
|
|
@ -516,7 +521,7 @@ impl StepDescription {
|
|||
}
|
||||
|
||||
// Determine the targets participating in this rule.
|
||||
let targets = if self.only_hosts { &builder.hosts } else { &builder.targets };
|
||||
let targets = if self.is_host { &builder.hosts } else { &builder.targets };
|
||||
|
||||
for target in targets {
|
||||
let run = RunConfig { builder, paths: pathsets.clone(), target: *target };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue