Skip to content

Rename and document ONLY_HOSTS in bootstrap #145324

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/bootstrap/src/core/build_steps/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<'_> {
Expand Down Expand Up @@ -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<'_> {
Expand Down Expand Up @@ -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 )?;

Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/src/core/build_steps/clippy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<'_> {
Expand Down
8 changes: 4 additions & 4 deletions src/bootstrap/src/core/build_steps/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,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<'_> {
Expand Down Expand Up @@ -1559,7 +1559,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")
Expand Down Expand Up @@ -1644,7 +1644,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")
Expand Down Expand Up @@ -2008,7 +2008,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")
Expand Down
36 changes: 18 additions & 18 deletions src/bootstrap/src/core/build_steps/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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<'_> {
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down
10 changes: 5 additions & 5 deletions src/bootstrap/src/core/build_steps/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/src/core/build_steps/gcc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Loading
Loading