Skip to content

Commit a43def7

Browse files
committed
Rename and document ONLY_HOSTS in bootstrap
1 parent 95c651d commit a43def7

File tree

13 files changed

+119
-114
lines changed

13 files changed

+119
-114
lines changed

src/bootstrap/src/core/build_steps/check.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ impl Rustc {
173173

174174
impl Step for Rustc {
175175
type Output = ();
176-
const ONLY_HOSTS: bool = true;
176+
const IS_HOST: bool = true;
177177
const DEFAULT: bool = true;
178178

179179
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
@@ -317,7 +317,7 @@ pub struct CodegenBackend {
317317

318318
impl Step for CodegenBackend {
319319
type Output = ();
320-
const ONLY_HOSTS: bool = true;
320+
const IS_HOST: bool = true;
321321
const DEFAULT: bool = true;
322322

323323
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
@@ -397,7 +397,7 @@ macro_rules! tool_check_step {
397397

398398
impl Step for $name {
399399
type Output = ();
400-
const ONLY_HOSTS: bool = true;
400+
const IS_HOST: bool = true;
401401
/// Most of the tool-checks using this macro are run by default.
402402
const DEFAULT: bool = true $( && $default )?;
403403

src/bootstrap/src/core/build_steps/clippy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ pub struct Rustc {
185185

186186
impl Step for Rustc {
187187
type Output = ();
188-
const ONLY_HOSTS: bool = true;
188+
const IS_HOST: bool = true;
189189
const DEFAULT: bool = true;
190190

191191
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {

src/bootstrap/src/core/build_steps/compile.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@ impl Step for Rustc {
989989
/// uplifting it from stage Y, causing the other stage to fail when attempting to link with
990990
/// stage X which was never actually built.
991991
type Output = u32;
992-
const ONLY_HOSTS: bool = true;
992+
const IS_HOST: bool = true;
993993
const DEFAULT: bool = false;
994994

995995
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
@@ -1544,7 +1544,7 @@ pub struct GccCodegenBackend {
15441544

15451545
impl Step for GccCodegenBackend {
15461546
type Output = BuildStamp;
1547-
const ONLY_HOSTS: bool = true;
1547+
const IS_HOST: bool = true;
15481548

15491549
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
15501550
run.alias("rustc_codegen_gcc").alias("cg_gcc")
@@ -1629,7 +1629,7 @@ pub struct CraneliftCodegenBackend {
16291629

16301630
impl Step for CraneliftCodegenBackend {
16311631
type Output = BuildStamp;
1632-
const ONLY_HOSTS: bool = true;
1632+
const IS_HOST: bool = true;
16331633

16341634
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
16351635
run.alias("rustc_codegen_cranelift").alias("cg_clif")
@@ -1993,7 +1993,7 @@ pub struct Assemble {
19931993

19941994
impl Step for Assemble {
19951995
type Output = Compiler;
1996-
const ONLY_HOSTS: bool = true;
1996+
const IS_HOST: bool = true;
19971997

19981998
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
19991999
run.path("compiler/rustc").path("compiler")

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

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ pub struct RustcDocs {
140140
impl Step for RustcDocs {
141141
type Output = Option<GeneratedTarball>;
142142
const DEFAULT: bool = true;
143-
const ONLY_HOSTS: bool = true;
143+
const IS_HOST: bool = true;
144144

145145
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
146146
let builder = run.builder;
@@ -402,7 +402,7 @@ pub struct Rustc {
402402
impl Step for Rustc {
403403
type Output = GeneratedTarball;
404404
const DEFAULT: bool = true;
405-
const ONLY_HOSTS: bool = true;
405+
const IS_HOST: bool = true;
406406

407407
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
408408
run.alias("rustc")
@@ -782,7 +782,7 @@ pub struct RustcDev {
782782
impl Step for RustcDev {
783783
type Output = Option<GeneratedTarball>;
784784
const DEFAULT: bool = true;
785-
const ONLY_HOSTS: bool = true;
785+
const IS_HOST: bool = true;
786786

787787
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
788788
run.alias("rustc-dev")
@@ -1012,7 +1012,7 @@ impl Step for Src {
10121012
/// The output path of the src installer tarball
10131013
type Output = GeneratedTarball;
10141014
const DEFAULT: bool = true;
1015-
const ONLY_HOSTS: bool = true;
1015+
const IS_HOST: bool = true;
10161016

10171017
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
10181018
run.alias("rust-src")
@@ -1073,7 +1073,7 @@ impl Step for PlainSourceTarball {
10731073
/// Produces the location of the tarball generated
10741074
type Output = GeneratedTarball;
10751075
const DEFAULT: bool = true;
1076-
const ONLY_HOSTS: bool = true;
1076+
const IS_HOST: bool = true;
10771077

10781078
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
10791079
let builder = run.builder;
@@ -1221,7 +1221,7 @@ pub struct Cargo {
12211221
impl Step for Cargo {
12221222
type Output = Option<GeneratedTarball>;
12231223
const DEFAULT: bool = true;
1224-
const ONLY_HOSTS: bool = true;
1224+
const IS_HOST: bool = true;
12251225

12261226
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
12271227
let default = should_build_extended_tool(run.builder, "cargo");
@@ -1275,7 +1275,7 @@ pub struct RustAnalyzer {
12751275
impl Step for RustAnalyzer {
12761276
type Output = Option<GeneratedTarball>;
12771277
const DEFAULT: bool = true;
1278-
const ONLY_HOSTS: bool = true;
1278+
const IS_HOST: bool = true;
12791279

12801280
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
12811281
let default = should_build_extended_tool(run.builder, "rust-analyzer");
@@ -1318,7 +1318,7 @@ pub struct Clippy {
13181318
impl Step for Clippy {
13191319
type Output = Option<GeneratedTarball>;
13201320
const DEFAULT: bool = true;
1321-
const ONLY_HOSTS: bool = true;
1321+
const IS_HOST: bool = true;
13221322

13231323
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
13241324
let default = should_build_extended_tool(run.builder, "clippy");
@@ -1366,7 +1366,7 @@ pub struct Miri {
13661366
impl Step for Miri {
13671367
type Output = Option<GeneratedTarball>;
13681368
const DEFAULT: bool = true;
1369-
const ONLY_HOSTS: bool = true;
1369+
const IS_HOST: bool = true;
13701370

13711371
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
13721372
let default = should_build_extended_tool(run.builder, "miri");
@@ -1415,7 +1415,7 @@ pub struct CraneliftCodegenBackend {
14151415
impl Step for CraneliftCodegenBackend {
14161416
type Output = Option<GeneratedTarball>;
14171417
const DEFAULT: bool = true;
1418-
const ONLY_HOSTS: bool = true;
1418+
const IS_HOST: bool = true;
14191419

14201420
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
14211421
// We only want to build the cranelift backend in `x dist` if the backend was enabled
@@ -1505,7 +1505,7 @@ pub struct Rustfmt {
15051505
impl Step for Rustfmt {
15061506
type Output = Option<GeneratedTarball>;
15071507
const DEFAULT: bool = true;
1508-
const ONLY_HOSTS: bool = true;
1508+
const IS_HOST: bool = true;
15091509

15101510
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
15111511
let default = should_build_extended_tool(run.builder, "rustfmt");
@@ -1550,7 +1550,7 @@ pub struct Extended {
15501550
impl Step for Extended {
15511551
type Output = ();
15521552
const DEFAULT: bool = true;
1553-
const ONLY_HOSTS: bool = true;
1553+
const IS_HOST: bool = true;
15541554

15551555
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
15561556
let builder = run.builder;
@@ -2286,7 +2286,7 @@ pub struct LlvmTools {
22862286

22872287
impl Step for LlvmTools {
22882288
type Output = Option<GeneratedTarball>;
2289-
const ONLY_HOSTS: bool = true;
2289+
const IS_HOST: bool = true;
22902290
const DEFAULT: bool = true;
22912291

22922292
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
@@ -2391,7 +2391,7 @@ pub struct LlvmBitcodeLinker {
23912391
impl Step for LlvmBitcodeLinker {
23922392
type Output = Option<GeneratedTarball>;
23932393
const DEFAULT: bool = true;
2394-
const ONLY_HOSTS: bool = true;
2394+
const IS_HOST: bool = true;
23952395

23962396
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
23972397
let default = should_build_extended_tool(run.builder, "llvm-bitcode-linker");
@@ -2443,7 +2443,7 @@ pub struct RustDev {
24432443
impl Step for RustDev {
24442444
type Output = Option<GeneratedTarball>;
24452445
const DEFAULT: bool = true;
2446-
const ONLY_HOSTS: bool = true;
2446+
const IS_HOST: bool = true;
24472447

24482448
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
24492449
run.alias("rust-dev")
@@ -2546,7 +2546,7 @@ pub struct Bootstrap {
25462546
impl Step for Bootstrap {
25472547
type Output = Option<GeneratedTarball>;
25482548
const DEFAULT: bool = false;
2549-
const ONLY_HOSTS: bool = true;
2549+
const IS_HOST: bool = true;
25502550

25512551
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
25522552
run.alias("bootstrap")
@@ -2586,7 +2586,7 @@ pub struct BuildManifest {
25862586
impl Step for BuildManifest {
25872587
type Output = GeneratedTarball;
25882588
const DEFAULT: bool = false;
2589-
const ONLY_HOSTS: bool = true;
2589+
const IS_HOST: bool = true;
25902590

25912591
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
25922592
run.alias("build-manifest")
@@ -2618,7 +2618,7 @@ pub struct ReproducibleArtifacts {
26182618
impl Step for ReproducibleArtifacts {
26192619
type Output = Option<GeneratedTarball>;
26202620
const DEFAULT: bool = true;
2621-
const ONLY_HOSTS: bool = true;
2621+
const IS_HOST: bool = true;
26222622

26232623
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
26242624
run.alias("reproducible-artifacts")

src/bootstrap/src/core/build_steps/doc.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ impl Rustc {
830830
impl Step for Rustc {
831831
type Output = ();
832832
const DEFAULT: bool = true;
833-
const ONLY_HOSTS: bool = true;
833+
const IS_HOST: bool = true;
834834

835835
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
836836
let builder = run.builder;
@@ -975,7 +975,7 @@ macro_rules! tool_doc {
975975
impl Step for $tool {
976976
type Output = ();
977977
const DEFAULT: bool = true;
978-
const ONLY_HOSTS: bool = true;
978+
const IS_HOST: bool = true;
979979

980980
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
981981
let builder = run.builder;
@@ -1139,7 +1139,7 @@ pub struct ErrorIndex {
11391139
impl Step for ErrorIndex {
11401140
type Output = ();
11411141
const DEFAULT: bool = true;
1142-
const ONLY_HOSTS: bool = true;
1142+
const IS_HOST: bool = true;
11431143

11441144
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
11451145
let builder = run.builder;
@@ -1181,7 +1181,7 @@ pub struct UnstableBookGen {
11811181
impl Step for UnstableBookGen {
11821182
type Output = ();
11831183
const DEFAULT: bool = true;
1184-
const ONLY_HOSTS: bool = true;
1184+
const IS_HOST: bool = true;
11851185

11861186
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
11871187
let builder = run.builder;
@@ -1248,7 +1248,7 @@ impl RustcBook {
12481248
impl Step for RustcBook {
12491249
type Output = ();
12501250
const DEFAULT: bool = true;
1251-
const ONLY_HOSTS: bool = true;
1251+
const IS_HOST: bool = true;
12521252

12531253
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
12541254
let builder = run.builder;

src/bootstrap/src/core/build_steps/gcc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub struct GccOutput {
3131
impl Step for Gcc {
3232
type Output = GccOutput;
3333

34-
const ONLY_HOSTS: bool = true;
34+
const IS_HOST: bool = true;
3535

3636
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
3737
run.path("src/gcc").alias("gcc")

0 commit comments

Comments
 (0)