Skip to content

Commit 4031b61

Browse files
committed
---
yaml --- r: 277239 b: refs/heads/try c: e8c0aeb h: refs/heads/master i: 277237: e36bbf1 277235: a39051b 277231: d960a45
1 parent 412b0ac commit 4031b61

40 files changed

+713
-126
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 6dbb0e86aec11050480beb76eade6fb805010ba7
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
4-
refs/heads/try: 894caf83648bb0a5e43e7aeb30f806b2fb9099a5
4+
refs/heads/try: e8c0aeb88ba1e12d0c0a1d0ed7b4a90b44460a29
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/RELEASES.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ Cargo
140140
Performance
141141
-----------
142142

143-
* [During type unification, the complexity of comparing variables for
144-
equivalance was reduced from `O(n!)` to `O(n)`][1.9tu]. This leads
145-
to major compile-time improvements in some scenarios.
143+
* [The time complexity of comparing variables for equivalence during type
144+
unification is reduced from _O_(_n_!) to _O_(_n_)][1.9tu]. This leads
145+
to major compilation time improvement in some scenarios.
146146
* [`ToString` is specialized for `str`, giving it the same performance
147147
as `to_owned`][1.9ts].
148148
* [Spawning processes with `Command::output` no longer creates extra

branches/try/mk/crates.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ TOOL_DEPS_rustdoc := rustdoc
133133
TOOL_DEPS_rustc := rustc_driver
134134
TOOL_DEPS_rustbook := std rustdoc
135135
TOOL_DEPS_error_index_generator := rustdoc syntax serialize
136-
TOOL_SOURCE_compiletest := $(S)src/compiletest/compiletest.rs
136+
TOOL_SOURCE_compiletest := $(S)src/tools/compiletest/src/main.rs
137137
TOOL_SOURCE_rustdoc := $(S)src/driver/driver.rs
138138
TOOL_SOURCE_rustc := $(S)src/driver/driver.rs
139139
TOOL_SOURCE_rustbook := $(S)src/tools/rustbook/main.rs

branches/try/mk/dist.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ PKG_FILES := \
5050
$(addprefix $(S)src/, \
5151
bootstrap \
5252
build_helper \
53-
compiletest \
5453
doc \
5554
driver \
5655
etc \

branches/try/mk/tests.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
611611
--run-lib-path $$(TLIB$(1)_T_$(2)_H_$(3)) \
612612
--rustc-path $$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
613613
--rustdoc-path $$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) \
614-
--llvm-bin-path $(CFG_LLVM_INST_DIR_$(CFG_BUILD))/bin \
614+
--llvm-filecheck $(CFG_LLVM_INST_DIR_$(CFG_BUILD))/bin/FileCheck \
615615
--aux-base $$(S)src/test/auxiliary/ \
616616
--stage-id stage$(1)-$(2) \
617617
--target $(2) \

branches/try/src/bootstrap/bootstrap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,11 +335,11 @@ def build_triple(self):
335335

336336
# Run the bootstrap
337337
args = [os.path.join(rb.build_dir, "bootstrap/debug/bootstrap")]
338-
args.extend(sys.argv[1:])
339338
args.append('--src')
340339
args.append(rb.rust_root)
341340
args.append('--build')
342341
args.append(rb.build)
342+
args.extend(sys.argv[1:])
343343
env = os.environ.copy()
344344
env["BOOTSTRAP_PARENT_ID"] = str(os.getpid())
345345
rb.run(args, env)

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

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
use std::fs;
12+
use std::path::PathBuf;
1213

1314
use build::{Build, Compiler};
1415

@@ -49,3 +50,55 @@ pub fn tidy(build: &Build, stage: u32, host: &str) {
4950
build.run(build.tool_cmd(&compiler, "tidy")
5051
.arg(build.src.join("src")));
5152
}
53+
54+
fn testdir(build: &Build, host: &str) -> PathBuf {
55+
build.out.join(host).join("test")
56+
}
57+
58+
pub fn compiletest(build: &Build,
59+
compiler: &Compiler,
60+
target: &str,
61+
mode: &str,
62+
suite: &str) {
63+
let mut cmd = build.tool_cmd(compiler, "compiletest");
64+
65+
cmd.arg("--compile-lib-path").arg(build.rustc_libdir(compiler));
66+
cmd.arg("--run-lib-path").arg(build.sysroot_libdir(compiler, target));
67+
cmd.arg("--rustc-path").arg(build.compiler_path(compiler));
68+
cmd.arg("--rustdoc-path").arg(build.rustdoc(compiler));
69+
cmd.arg("--src-base").arg(build.src.join("src/test").join(suite));
70+
cmd.arg("--aux-base").arg(build.src.join("src/test/auxiliary"));
71+
cmd.arg("--build-base").arg(testdir(build, compiler.host).join(suite));
72+
cmd.arg("--stage-id").arg(format!("stage{}-{}", compiler.stage, target));
73+
cmd.arg("--mode").arg(mode);
74+
cmd.arg("--target").arg(target);
75+
cmd.arg("--host").arg(compiler.host);
76+
cmd.arg("--llvm-filecheck").arg(build.llvm_filecheck(&build.config.build));
77+
78+
let linkflag = format!("-Lnative={}", build.test_helpers_out(target).display());
79+
cmd.arg("--host-rustcflags").arg("-Crpath");
80+
cmd.arg("--target-rustcflags").arg(format!("-Crpath {}", linkflag));
81+
82+
// FIXME: needs android support
83+
cmd.arg("--android-cross-path").arg("");
84+
// FIXME: CFG_PYTHON should probably be detected more robustly elsewhere
85+
cmd.arg("--python").arg("python");
86+
87+
if let Some(ref vers) = build.gdb_version {
88+
cmd.arg("--gdb-version").arg(vers);
89+
}
90+
if let Some(ref vers) = build.lldb_version {
91+
cmd.arg("--lldb-version").arg(vers);
92+
}
93+
if let Some(ref dir) = build.lldb_python_dir {
94+
cmd.arg("--lldb-python-dir").arg(dir);
95+
}
96+
97+
cmd.args(&build.flags.args);
98+
99+
if build.config.verbose || build.flags.verbose {
100+
cmd.arg("--verbose");
101+
}
102+
103+
build.run(&mut cmd);
104+
}

branches/try/src/bootstrap/build/clean.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,14 @@ pub fn clean(build: &Build) {
1919
let out = build.out.join(host);
2020

2121
rm_rf(build, &out.join("compiler-rt"));
22+
rm_rf(build, &out.join("doc"));
2223

2324
for stage in 0..4 {
2425
rm_rf(build, &out.join(format!("stage{}", stage)));
2526
rm_rf(build, &out.join(format!("stage{}-std", stage)));
2627
rm_rf(build, &out.join(format!("stage{}-rustc", stage)));
28+
rm_rf(build, &out.join(format!("stage{}-tools", stage)));
29+
rm_rf(build, &out.join(format!("stage{}-test", stage)));
2730
}
2831
}
2932
}

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,7 @@ pub fn rustc<'a>(build: &'a Build, target: &str, compiler: &Compiler<'a>) {
191191
if !build.unstable_features {
192192
cargo.env("CFG_DISABLE_UNSTABLE_FEATURES", "1");
193193
}
194-
let target_config = build.config.target_config.get(target);
195-
if let Some(ref s) = target_config.and_then(|c| c.llvm_config.as_ref()) {
196-
cargo.env("LLVM_CONFIG", s);
197-
} else {
198-
let llvm_config = build.llvm_out(&build.config.build).join("bin")
199-
.join(exe("llvm-config", target));
200-
cargo.env("LLVM_CONFIG", llvm_config);
201-
}
194+
cargo.env("LLVM_CONFIG", build.llvm_config(target));
202195
if build.config.llvm_static_stdcpp {
203196
cargo.env("LLVM_STATIC_STDCPP",
204197
compiler_file(build.cxx(target), "libstdc++.a"));

branches/try/src/bootstrap/build/dist.rs

Lines changed: 30 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -195,29 +195,7 @@ pub fn rustc(build: &Build, stage: u32, host: &str) {
195195
cp_r(&build.src.join("man"), &image.join("share/man/man1"));
196196

197197
// Debugger scripts
198-
let cp_debugger_script = |file: &str| {
199-
let dst = image.join("lib/rustlib/etc");
200-
t!(fs::create_dir_all(&dst));
201-
install(&build.src.join("src/etc/").join(file), &dst, 0o644);
202-
};
203-
if host.contains("windows") {
204-
// no debugger scripts
205-
} else if host.contains("darwin") {
206-
// lldb debugger scripts
207-
install(&build.src.join("src/etc/rust-lldb"), &image.join("bin"),
208-
0o755);
209-
210-
cp_debugger_script("lldb_rust_formatters.py");
211-
cp_debugger_script("debugger_pretty_printers_common.py");
212-
} else {
213-
// gdb debugger scripts
214-
install(&build.src.join("src/etc/rust-gdb"), &image.join("bin"),
215-
0o755);
216-
217-
cp_debugger_script("gdb_load_rust_pretty_printers.py");
218-
cp_debugger_script("gdb_rust_pretty_printing.py");
219-
cp_debugger_script("debugger_pretty_printers_common.py");
220-
}
198+
debugger_scripts(build, &image, host);
221199

222200
// Misc license info
223201
let cp = |file: &str| {
@@ -231,6 +209,35 @@ pub fn rustc(build: &Build, stage: u32, host: &str) {
231209
}
232210
}
233211

212+
pub fn debugger_scripts(build: &Build,
213+
sysroot: &Path,
214+
host: &str) {
215+
let cp_debugger_script = |file: &str| {
216+
let dst = sysroot.join("lib/rustlib/etc");
217+
t!(fs::create_dir_all(&dst));
218+
install(&build.src.join("src/etc/").join(file), &dst, 0o644);
219+
};
220+
if host.contains("windows") {
221+
// no debugger scripts
222+
} else if host.contains("darwin") {
223+
// lldb debugger scripts
224+
install(&build.src.join("src/etc/rust-lldb"), &sysroot.join("bin"),
225+
0o755);
226+
227+
cp_debugger_script("lldb_rust_formatters.py");
228+
cp_debugger_script("debugger_pretty_printers_common.py");
229+
} else {
230+
// gdb debugger scripts
231+
install(&build.src.join("src/etc/rust-gdb"), &sysroot.join("bin"),
232+
0o755);
233+
234+
cp_debugger_script("gdb_load_rust_pretty_printers.py");
235+
cp_debugger_script("gdb_rust_pretty_printing.py");
236+
cp_debugger_script("debugger_pretty_printers_common.py");
237+
}
238+
}
239+
240+
234241
pub fn std(build: &Build, compiler: &Compiler, target: &str) {
235242
println!("Dist std stage{} ({} -> {})", compiler.stage, compiler.host,
236243
target);

branches/try/src/bootstrap/build/flags.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,6 @@ impl Flags {
6262
usage(0);
6363
}
6464

65-
if m.free.len() > 0 {
66-
println!("free arguments are not currently accepted");
67-
usage(1);
68-
}
69-
7065
let cfg_file = m.opt_str("config").map(PathBuf::from).or_else(|| {
7166
if fs::metadata("config.toml").is_ok() {
7267
Some(PathBuf::from("config.toml"))

0 commit comments

Comments
 (0)