Skip to content

Commit b441872

Browse files
committed
---
yaml --- r: 273183 b: refs/heads/beta c: 4982f91 h: refs/heads/master i: 273181: f88e0eb 273179: 6b2bbf1 273175: ab22ad1 273167: 894ecde 273151: 2e9fba5
1 parent 277ca93 commit b441872

File tree

205 files changed

+1935
-5144
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

205 files changed

+1935
-5144
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: f9121e87a662568d42cc481f87d81ed4df38cc0d
26+
refs/heads/beta: 4982f913461a2a6dfbac8bace53961233322646a
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/mk/crates.mk

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ TARGET_CRATES := libc std term \
5353
getopts collections test rand \
5454
core alloc \
5555
rustc_unicode rustc_bitflags \
56-
alloc_system alloc_jemalloc rustc_const_eval
56+
alloc_system alloc_jemalloc
5757
RUSTC_CRATES := rustc rustc_typeck rustc_mir rustc_borrowck rustc_resolve rustc_driver \
5858
rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint \
5959
rustc_data_structures rustc_front rustc_platform_intrinsics \
@@ -91,11 +91,8 @@ DEPS_test := std getopts term native:rust_test_helpers
9191
DEPS_syntax := std term serialize log arena libc rustc_bitflags rustc_unicode
9292
DEPS_syntax_ext := syntax fmt_macros
9393

94-
DEPS_rustc_const_eval := std syntax
95-
9694
DEPS_rustc := syntax fmt_macros flate arena serialize getopts rbml rustc_front\
97-
log graphviz rustc_llvm rustc_back rustc_data_structures\
98-
rustc_const_eval
95+
log graphviz rustc_llvm rustc_back rustc_data_structures
9996
DEPS_rustc_back := std syntax rustc_llvm rustc_front flate log libc
10097
DEPS_rustc_borrowck := rustc rustc_front log graphviz syntax
10198
DEPS_rustc_data_structures := std log serialize
@@ -106,17 +103,16 @@ DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_bo
106103
DEPS_rustc_front := std syntax log serialize
107104
DEPS_rustc_lint := rustc log syntax
108105
DEPS_rustc_llvm := native:rustllvm libc std rustc_bitflags
109-
DEPS_rustc_metadata := rustc rustc_front syntax rbml rustc_const_eval
106+
DEPS_rustc_metadata := rustc rustc_front syntax rbml
110107
DEPS_rustc_passes := syntax rustc core rustc_front
111-
DEPS_rustc_mir := rustc rustc_front syntax rustc_const_eval
108+
DEPS_rustc_mir := rustc rustc_front syntax
112109
DEPS_rustc_resolve := arena rustc rustc_front log syntax
113110
DEPS_rustc_platform_intrinsics := rustc rustc_llvm
114111
DEPS_rustc_plugin := rustc rustc_metadata syntax rustc_mir
115112
DEPS_rustc_privacy := rustc rustc_front log syntax
116113
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back rustc_mir \
117-
log syntax serialize rustc_llvm rustc_front rustc_platform_intrinsics \
118-
rustc_const_eval
119-
DEPS_rustc_typeck := rustc syntax rustc_front rustc_platform_intrinsics rustc_const_eval
114+
log syntax serialize rustc_llvm rustc_front rustc_platform_intrinsics
115+
DEPS_rustc_typeck := rustc syntax rustc_front rustc_platform_intrinsics
120116

121117
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \
122118
test rustc_lint rustc_front

branches/beta/src/bootstrap/build/check.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
use std::process::Command;
12+
1113
use build::{Build, Compiler};
1214

1315
pub fn linkcheck(build: &Build, stage: u32, host: &str) {
1416
println!("Linkcheck stage{} ({})", stage, host);
1517
let compiler = Compiler::new(stage, host);
16-
build.run(build.tool_cmd(&compiler, "linkchecker")
17-
.arg(build.out.join(host).join("doc")));
18+
let linkchecker = build.tool(&compiler, "linkchecker");
19+
build.run(Command::new(&linkchecker)
20+
.arg(build.out.join(host).join("doc")));
1821
}

branches/beta/src/bootstrap/build/compile.rs

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,26 @@ use build::{Build, Compiler, Mode};
2323
/// This will build the standard library for a particular stage of the build
2424
/// using the `compiler` targeting the `target` architecture. The artifacts
2525
/// created will also be linked into the sysroot directory.
26-
pub fn std<'a>(build: &'a Build, target: &str, compiler: &Compiler<'a>) {
27-
println!("Building stage{} std artifacts ({} -> {})", compiler.stage,
28-
compiler.host, target);
26+
pub fn std<'a>(build: &'a Build, stage: u32, target: &str,
27+
compiler: &Compiler<'a>) {
28+
let host = compiler.host;
29+
println!("Building stage{} std artifacts ({} -> {})", stage,
30+
host, target);
2931

3032
// Move compiler-rt into place as it'll be required by the compiler when
3133
// building the standard library to link the dylib of libstd
32-
let libdir = build.sysroot_libdir(compiler, target);
34+
let libdir = build.sysroot_libdir(stage, &host, target);
3335
let _ = fs::remove_dir_all(&libdir);
3436
t!(fs::create_dir_all(&libdir));
3537
t!(fs::hard_link(&build.compiler_rt_built.borrow()[target],
3638
libdir.join(staticlib("compiler-rt", target))));
3739

3840
build_startup_objects(build, target, &libdir);
3941

40-
let out_dir = build.cargo_out(compiler, Mode::Libstd, target);
42+
let out_dir = build.cargo_out(stage, &host, Mode::Libstd, target);
4143
build.clear_if_dirty(&out_dir, &build.compiler_path(compiler));
42-
let mut cargo = build.cargo(compiler, Mode::Libstd, target, "build");
44+
let mut cargo = build.cargo(stage, compiler, Mode::Libstd, Some(target),
45+
"build");
4346
cargo.arg("--features").arg(build.std_features())
4447
.arg("--manifest-path")
4548
.arg(build.src.join("src/rustc/std_shim/Cargo.toml"));
@@ -56,20 +59,20 @@ pub fn std<'a>(build: &'a Build, target: &str, compiler: &Compiler<'a>) {
5659
}
5760

5861
build.run(&mut cargo);
59-
std_link(build, target, compiler, compiler.host);
62+
std_link(build, stage, target, compiler, host);
6063
}
6164

6265
/// Link all libstd rlibs/dylibs into the sysroot location.
6366
///
6467
/// Links those artifacts generated in the given `stage` for `target` produced
6568
/// by `compiler` into `host`'s sysroot.
6669
pub fn std_link(build: &Build,
70+
stage: u32,
6771
target: &str,
6872
compiler: &Compiler,
6973
host: &str) {
70-
let target_compiler = Compiler::new(compiler.stage, host);
71-
let libdir = build.sysroot_libdir(&target_compiler, target);
72-
let out_dir = build.cargo_out(compiler, Mode::Libstd, target);
74+
let libdir = build.sysroot_libdir(stage, host, target);
75+
let out_dir = build.cargo_out(stage, compiler.host, Mode::Libstd, target);
7376

7477
// If we're linking one compiler host's output into another, then we weren't
7578
// called from the `std` method above. In that case we clean out what's
@@ -82,8 +85,7 @@ pub fn std_link(build: &Build,
8285
}
8386
add_to_sysroot(&out_dir, &libdir);
8487

85-
if target.contains("musl") &&
86-
(target.contains("x86_64") || target.contains("i686")) {
88+
if target.contains("musl") && (target.contains("x86_64") || target.contains("i686")) {
8789
copy_third_party_objects(build, target, &libdir);
8890
}
8991
}
@@ -128,14 +130,17 @@ fn build_startup_objects(build: &Build, target: &str, into: &Path) {
128130
/// This will build the compiler for a particular stage of the build using
129131
/// the `compiler` targeting the `target` architecture. The artifacts
130132
/// created will also be linked into the sysroot directory.
131-
pub fn rustc<'a>(build: &'a Build, target: &str, compiler: &Compiler<'a>) {
132-
println!("Building stage{} compiler artifacts ({} -> {})",
133-
compiler.stage, compiler.host, target);
133+
pub fn rustc<'a>(build: &'a Build, stage: u32, target: &str,
134+
compiler: &Compiler<'a>) {
135+
let host = compiler.host;
136+
println!("Building stage{} compiler artifacts ({} -> {})", stage,
137+
host, target);
134138

135-
let out_dir = build.cargo_out(compiler, Mode::Librustc, target);
136-
build.clear_if_dirty(&out_dir, &libstd_shim(build, compiler, target));
139+
let out_dir = build.cargo_out(stage, &host, Mode::Librustc, target);
140+
build.clear_if_dirty(&out_dir, &libstd_shim(build, stage, &host, target));
137141

138-
let mut cargo = build.cargo(compiler, Mode::Librustc, target, "build");
142+
let mut cargo = build.cargo(stage, compiler, Mode::Librustc, Some(target),
143+
"build");
139144
cargo.arg("--features").arg(build.rustc_features())
140145
.arg("--manifest-path")
141146
.arg(build.src.join("src/rustc/Cargo.toml"));
@@ -179,27 +184,27 @@ pub fn rustc<'a>(build: &'a Build, target: &str, compiler: &Compiler<'a>) {
179184
}
180185
build.run(&mut cargo);
181186

182-
rustc_link(build, target, compiler, compiler.host);
187+
rustc_link(build, stage, target, compiler, compiler.host);
183188
}
184189

185190
/// Link all librustc rlibs/dylibs into the sysroot location.
186191
///
187192
/// Links those artifacts generated in the given `stage` for `target` produced
188193
/// by `compiler` into `host`'s sysroot.
189194
pub fn rustc_link(build: &Build,
195+
stage: u32,
190196
target: &str,
191197
compiler: &Compiler,
192198
host: &str) {
193-
let target_compiler = Compiler::new(compiler.stage, host);
194-
let libdir = build.sysroot_libdir(&target_compiler, target);
195-
let out_dir = build.cargo_out(compiler, Mode::Librustc, target);
199+
let libdir = build.sysroot_libdir(stage, host, target);
200+
let out_dir = build.cargo_out(stage, compiler.host, Mode::Librustc, target);
196201
add_to_sysroot(&out_dir, &libdir);
197202
}
198203

199204
/// Cargo's output path for the standard library in a given stage, compiled
200205
/// by a particular compiler for the specified target.
201-
fn libstd_shim(build: &Build, compiler: &Compiler, target: &str) -> PathBuf {
202-
build.cargo_out(compiler, Mode::Libstd, target).join("libstd_shim.rlib")
206+
fn libstd_shim(build: &Build, stage: u32, host: &str, target: &str) -> PathBuf {
207+
build.cargo_out(stage, host, Mode::Libstd, target).join("libstd_shim.rlib")
203208
}
204209

205210
fn compiler_file(compiler: &Path, file: &str) -> String {
@@ -214,29 +219,25 @@ fn compiler_file(compiler: &Path, file: &str) -> String {
214219
/// compiler.
215220
pub fn assemble_rustc(build: &Build, stage: u32, host: &str) {
216221
assert!(stage > 0, "the stage0 compiler isn't assembled, it's downloaded");
217-
// The compiler that we're assembling
218-
let target_compiler = Compiler::new(stage, host);
219-
220-
// The compiler that compiled the compiler we're assembling
221-
let build_compiler = Compiler::new(stage - 1, &build.config.build);
222222

223223
// Clear out old files
224-
let sysroot = build.sysroot(&target_compiler);
224+
let sysroot = build.sysroot(stage, host);
225225
let _ = fs::remove_dir_all(&sysroot);
226226
t!(fs::create_dir_all(&sysroot));
227227

228228
// Link in all dylibs to the libdir
229229
let sysroot_libdir = sysroot.join(libdir(host));
230230
t!(fs::create_dir_all(&sysroot_libdir));
231-
let src_libdir = build.sysroot_libdir(&build_compiler, host);
231+
let src_libdir = build.sysroot_libdir(stage - 1, &build.config.build, host);
232232
for f in t!(fs::read_dir(&src_libdir)).map(|f| t!(f)) {
233233
let filename = f.file_name().into_string().unwrap();
234234
if is_dylib(&filename) {
235235
t!(fs::hard_link(&f.path(), sysroot_libdir.join(&filename)));
236236
}
237237
}
238238

239-
let out_dir = build.cargo_out(&build_compiler, Mode::Librustc, host);
239+
let out_dir = build.cargo_out(stage - 1, &build.config.build,
240+
Mode::Librustc, host);
240241

241242
// Link the compiler binary itself into place
242243
let rustc = out_dir.join(exe("rustc", host));
@@ -314,7 +315,7 @@ pub fn tool(build: &Build, stage: u32, host: &str, tool: &str) {
314315
// let out_dir = build.cargo_out(stage, &host, Mode::Librustc, target);
315316
// build.clear_if_dirty(&out_dir, &libstd_shim(build, stage, &host, target));
316317

317-
let mut cargo = build.cargo(&compiler, Mode::Tool, host, "build");
318+
let mut cargo = build.cargo(stage, &compiler, Mode::Tool, None, "build");
318319
cargo.arg("--manifest-path")
319320
.arg(build.src.join(format!("src/tools/{}/Cargo.toml", tool)));
320321
build.run(&mut cargo);

branches/beta/src/bootstrap/build/doc.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ pub fn standalone(build: &Build, stage: u32, host: &str, out: &Path) {
8181
}
8282

8383
let mut cmd = Command::new(&rustdoc);
84-
build.add_rustc_lib_path(&compiler, &mut cmd);
8584
cmd.arg("--html-after-content").arg(&footer)
8685
.arg("--html-before-content").arg(&version_info)
8786
.arg("--html-in-header").arg(&favicon)
@@ -108,13 +107,14 @@ pub fn standalone(build: &Build, stage: u32, host: &str, out: &Path) {
108107
pub fn std(build: &Build, stage: u32, host: &str, out: &Path) {
109108
println!("Documenting stage{} std ({})", stage, host);
110109
let compiler = Compiler::new(stage, host);
111-
let out_dir = build.stage_out(&compiler, Mode::Libstd)
110+
let out_dir = build.stage_out(stage, host, Mode::Libstd)
112111
.join(host).join("doc");
113112
let rustdoc = build.rustdoc(&compiler);
114113

115114
build.clear_if_dirty(&out_dir, &rustdoc);
116115

117-
let mut cargo = build.cargo(&compiler, Mode::Libstd, host, "doc");
116+
let mut cargo = build.cargo(stage, &compiler, Mode::Libstd, Some(host),
117+
"doc");
118118
cargo.arg("--manifest-path")
119119
.arg(build.src.join("src/rustc/std_shim/Cargo.toml"))
120120
.arg("--features").arg(build.std_features());
@@ -125,13 +125,14 @@ pub fn std(build: &Build, stage: u32, host: &str, out: &Path) {
125125
pub fn rustc(build: &Build, stage: u32, host: &str, out: &Path) {
126126
println!("Documenting stage{} compiler ({})", stage, host);
127127
let compiler = Compiler::new(stage, host);
128-
let out_dir = build.stage_out(&compiler, Mode::Librustc)
128+
let out_dir = build.stage_out(stage, host, Mode::Librustc)
129129
.join(host).join("doc");
130130
let rustdoc = build.rustdoc(&compiler);
131131
if !up_to_date(&rustdoc, &out_dir.join("rustc/index.html")) {
132132
t!(fs::remove_dir_all(&out_dir));
133133
}
134-
let mut cargo = build.cargo(&compiler, Mode::Librustc, host, "doc");
134+
let mut cargo = build.cargo(stage, &compiler, Mode::Librustc, Some(host),
135+
"doc");
135136
cargo.arg("--manifest-path")
136137
.arg(build.src.join("src/rustc/Cargo.toml"))
137138
.arg("--features").arg(build.rustc_features());
@@ -142,7 +143,7 @@ pub fn rustc(build: &Build, stage: u32, host: &str, out: &Path) {
142143
pub fn error_index(build: &Build, stage: u32, host: &str, out: &Path) {
143144
println!("Documenting stage{} error index ({})", stage, host);
144145
let compiler = Compiler::new(stage, host);
145-
let mut index = build.tool_cmd(&compiler, "error_index_generator");
146+
let mut index = Command::new(build.tool(&compiler, "error_index_generator"));
146147
index.arg("html");
147148
index.arg(out.join("error-index.html"));
148149

0 commit comments

Comments
 (0)