Skip to content

Commit e08c755

Browse files
committed
Rename and document ONLY_HOSTS in bootstrap
1 parent f382d54 commit e08c755

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
@@ -172,7 +172,7 @@ impl Rustc {
172172

173173
impl Step for Rustc {
174174
type Output = ();
175-
const ONLY_HOSTS: bool = true;
175+
const IS_HOST: bool = true;
176176
const DEFAULT: bool = true;
177177

178178
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
@@ -324,7 +324,7 @@ pub struct CodegenBackend {
324324

325325
impl Step for CodegenBackend {
326326
type Output = ();
327-
const ONLY_HOSTS: bool = true;
327+
const IS_HOST: bool = true;
328328
const DEFAULT: bool = true;
329329

330330
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
@@ -410,7 +410,7 @@ macro_rules! tool_check_step {
410410

411411
impl Step for $name {
412412
type Output = ();
413-
const ONLY_HOSTS: bool = true;
413+
const IS_HOST: bool = true;
414414
/// Most of the tool-checks using this macro are run by default.
415415
const DEFAULT: bool = true $( && $default )?;
416416

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ impl Rustc {
256256

257257
impl Step for Rustc {
258258
type Output = ();
259-
const ONLY_HOSTS: bool = true;
259+
const IS_HOST: bool = true;
260260
const DEFAULT: bool = true;
261261

262262
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
@@ -995,7 +995,7 @@ impl Step for Rustc {
995995
/// uplifting it from stage Y, causing the other stage to fail when attempting to link with
996996
/// stage X which was never actually built.
997997
type Output = u32;
998-
const ONLY_HOSTS: bool = true;
998+
const IS_HOST: bool = true;
999999
const DEFAULT: bool = false;
10001000

10011001
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
@@ -1559,7 +1559,7 @@ pub struct GccCodegenBackend {
15591559
impl Step for GccCodegenBackend {
15601560
type Output = GccCodegenBackendOutput;
15611561

1562-
const ONLY_HOSTS: bool = true;
1562+
const IS_HOST: bool = true;
15631563

15641564
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
15651565
run.alias("rustc_codegen_gcc").alias("cg_gcc")
@@ -1644,7 +1644,7 @@ pub struct CraneliftCodegenBackend {
16441644

16451645
impl Step for CraneliftCodegenBackend {
16461646
type Output = BuildStamp;
1647-
const ONLY_HOSTS: bool = true;
1647+
const IS_HOST: bool = true;
16481648

16491649
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
16501650
run.alias("rustc_codegen_cranelift").alias("cg_clif")
@@ -2008,7 +2008,7 @@ pub struct Assemble {
20082008

20092009
impl Step for Assemble {
20102010
type Output = Compiler;
2011-
const ONLY_HOSTS: bool = true;
2011+
const IS_HOST: bool = true;
20122012

20132013
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
20142014
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")
@@ -794,7 +794,7 @@ pub struct RustcDev {
794794
impl Step for RustcDev {
795795
type Output = Option<GeneratedTarball>;
796796
const DEFAULT: bool = true;
797-
const ONLY_HOSTS: bool = true;
797+
const IS_HOST: bool = true;
798798

799799
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
800800
run.alias("rustc-dev")
@@ -1024,7 +1024,7 @@ impl Step for Src {
10241024
/// The output path of the src installer tarball
10251025
type Output = GeneratedTarball;
10261026
const DEFAULT: bool = true;
1027-
const ONLY_HOSTS: bool = true;
1027+
const IS_HOST: bool = true;
10281028

10291029
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
10301030
run.alias("rust-src")
@@ -1085,7 +1085,7 @@ impl Step for PlainSourceTarball {
10851085
/// Produces the location of the tarball generated
10861086
type Output = GeneratedTarball;
10871087
const DEFAULT: bool = true;
1088-
const ONLY_HOSTS: bool = true;
1088+
const IS_HOST: bool = true;
10891089

10901090
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
10911091
let builder = run.builder;
@@ -1233,7 +1233,7 @@ pub struct Cargo {
12331233
impl Step for Cargo {
12341234
type Output = Option<GeneratedTarball>;
12351235
const DEFAULT: bool = true;
1236-
const ONLY_HOSTS: bool = true;
1236+
const IS_HOST: bool = true;
12371237

12381238
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
12391239
let default = should_build_extended_tool(run.builder, "cargo");
@@ -1287,7 +1287,7 @@ pub struct RustAnalyzer {
12871287
impl Step for RustAnalyzer {
12881288
type Output = Option<GeneratedTarball>;
12891289
const DEFAULT: bool = true;
1290-
const ONLY_HOSTS: bool = true;
1290+
const IS_HOST: bool = true;
12911291

12921292
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
12931293
let default = should_build_extended_tool(run.builder, "rust-analyzer");
@@ -1330,7 +1330,7 @@ pub struct Clippy {
13301330
impl Step for Clippy {
13311331
type Output = Option<GeneratedTarball>;
13321332
const DEFAULT: bool = true;
1333-
const ONLY_HOSTS: bool = true;
1333+
const IS_HOST: bool = true;
13341334

13351335
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
13361336
let default = should_build_extended_tool(run.builder, "clippy");
@@ -1378,7 +1378,7 @@ pub struct Miri {
13781378
impl Step for Miri {
13791379
type Output = Option<GeneratedTarball>;
13801380
const DEFAULT: bool = true;
1381-
const ONLY_HOSTS: bool = true;
1381+
const IS_HOST: bool = true;
13821382

13831383
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
13841384
let default = should_build_extended_tool(run.builder, "miri");
@@ -1428,7 +1428,7 @@ pub struct CraneliftCodegenBackend {
14281428
impl Step for CraneliftCodegenBackend {
14291429
type Output = Option<GeneratedTarball>;
14301430
const DEFAULT: bool = true;
1431-
const ONLY_HOSTS: bool = true;
1431+
const IS_HOST: bool = true;
14321432

14331433
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
14341434
// We only want to build the cranelift backend in `x dist` if the backend was enabled
@@ -1519,7 +1519,7 @@ pub struct Rustfmt {
15191519
impl Step for Rustfmt {
15201520
type Output = Option<GeneratedTarball>;
15211521
const DEFAULT: bool = true;
1522-
const ONLY_HOSTS: bool = true;
1522+
const IS_HOST: bool = true;
15231523

15241524
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
15251525
let default = should_build_extended_tool(run.builder, "rustfmt");
@@ -1564,7 +1564,7 @@ pub struct Extended {
15641564
impl Step for Extended {
15651565
type Output = ();
15661566
const DEFAULT: bool = true;
1567-
const ONLY_HOSTS: bool = true;
1567+
const IS_HOST: bool = true;
15681568

15691569
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
15701570
let builder = run.builder;
@@ -2301,7 +2301,7 @@ pub struct LlvmTools {
23012301

23022302
impl Step for LlvmTools {
23032303
type Output = Option<GeneratedTarball>;
2304-
const ONLY_HOSTS: bool = true;
2304+
const IS_HOST: bool = true;
23052305
const DEFAULT: bool = true;
23062306

23072307
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
@@ -2406,7 +2406,7 @@ pub struct LlvmBitcodeLinker {
24062406
impl Step for LlvmBitcodeLinker {
24072407
type Output = Option<GeneratedTarball>;
24082408
const DEFAULT: bool = true;
2409-
const ONLY_HOSTS: bool = true;
2409+
const IS_HOST: bool = true;
24102410

24112411
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
24122412
let default = should_build_extended_tool(run.builder, "llvm-bitcode-linker");
@@ -2458,7 +2458,7 @@ pub struct RustDev {
24582458
impl Step for RustDev {
24592459
type Output = Option<GeneratedTarball>;
24602460
const DEFAULT: bool = true;
2461-
const ONLY_HOSTS: bool = true;
2461+
const IS_HOST: bool = true;
24622462

24632463
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
24642464
run.alias("rust-dev")
@@ -2561,7 +2561,7 @@ pub struct Bootstrap {
25612561
impl Step for Bootstrap {
25622562
type Output = Option<GeneratedTarball>;
25632563
const DEFAULT: bool = false;
2564-
const ONLY_HOSTS: bool = true;
2564+
const IS_HOST: bool = true;
25652565

25662566
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
25672567
run.alias("bootstrap")
@@ -2601,7 +2601,7 @@ pub struct BuildManifest {
26012601
impl Step for BuildManifest {
26022602
type Output = GeneratedTarball;
26032603
const DEFAULT: bool = false;
2604-
const ONLY_HOSTS: bool = true;
2604+
const IS_HOST: bool = true;
26052605

26062606
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
26072607
run.alias("build-manifest")
@@ -2633,7 +2633,7 @@ pub struct ReproducibleArtifacts {
26332633
impl Step for ReproducibleArtifacts {
26342634
type Output = Option<GeneratedTarball>;
26352635
const DEFAULT: bool = true;
2636-
const ONLY_HOSTS: bool = true;
2636+
const IS_HOST: bool = true;
26372637

26382638
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
26392639
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
@@ -47,7 +47,7 @@ impl GccOutput {
4747
impl Step for Gcc {
4848
type Output = GccOutput;
4949

50-
const ONLY_HOSTS: bool = true;
50+
const IS_HOST: bool = true;
5151

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

0 commit comments

Comments
 (0)