Skip to content

Commit e6985b2

Browse files
committed
rustbuild: Add install target. #34675
It just prints to the screen currently.
1 parent 46957f0 commit e6985b2

File tree

4 files changed

+37
-4
lines changed

4 files changed

+37
-4
lines changed

src/bootstrap/install.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
//! Implementation of the install aspects of the compiler.
12+
//!
13+
//! This module is responsible for installing the standard library,
14+
//! compiler, and documentation.
15+
16+
use Build;
17+
18+
/// Installs everything.
19+
pub fn install(_: &Build, stage: u32, host: &str) {
20+
println!("Install everything stage{} ({})", stage, host);
21+
println!("Note: install currently does nothing.");
22+
}

src/bootstrap/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ mod config;
6262
mod dist;
6363
mod doc;
6464
mod flags;
65+
mod install;
6566
mod native;
6667
mod sanity;
6768
mod step;
@@ -453,6 +454,8 @@ impl Build {
453454
DistStd { compiler } => dist::std(self, &compiler, target.target),
454455
DistSrc { _dummy } => dist::rust_src(self),
455456

457+
Install { stage } => install::install(self, stage, target.target),
458+
456459
DebuggerScripts { stage } => {
457460
let compiler = Compiler::new(stage, target.target);
458461
dist::debugger_scripts(self,

src/bootstrap/mk/Makefile.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ check-cargotest:
5151
$(Q)$(BOOTSTRAP) --step check-cargotest
5252
dist:
5353
$(Q)$(BOOTSTRAP) --step dist
54+
install:
55+
$(Q)$(BOOTSTRAP) --step install
5456
tidy:
5557
$(Q)$(BOOTSTRAP) --step check-tidy --stage 0
5658

src/bootstrap/step.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ macro_rules! targets {
140140
(dist_std, DistStd { compiler: Compiler<'a> }),
141141
(dist_src, DistSrc { _dummy: () }),
142142

143+
// install target
144+
(install, Install { stage: u32 }),
145+
143146
// Misc targets
144147
(android_copy_libs, AndroidCopyLibs { compiler: Compiler<'a> }),
145148
}
@@ -249,8 +252,7 @@ fn top_level(build: &Build) -> Vec<Step> {
249252
}
250253
}
251254

252-
return targets
253-
255+
targets
254256
}
255257

256258
fn add_steps<'a>(build: &'a Build,
@@ -467,7 +469,7 @@ impl<'a> Step<'a> {
467469
self.dist(stage),
468470
]);
469471
}
470-
return base
472+
base
471473
}
472474
Source::CheckLinkcheck { stage } => {
473475
vec![self.tool_linkchecker(stage), self.doc(stage)]
@@ -590,7 +592,11 @@ impl<'a> Step<'a> {
590592
base.push(target.dist_std(compiler));
591593
}
592594
}
593-
return base
595+
base
596+
}
597+
598+
Source::Install { stage } => {
599+
vec![self.dist(stage)]
594600
}
595601

596602
Source::AndroidCopyLibs { compiler } => {

0 commit comments

Comments
 (0)