Skip to content

Commit 95329ba

Browse files
committed
---
yaml --- r: 277244 b: refs/heads/try c: 5f47915 h: refs/heads/master
1 parent 3dfc771 commit 95329ba

Some content is hidden

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

60 files changed

+285
-1278
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: 478a33dabc4e6f2f501f476c79b56178d9df4f37
4+
refs/heads/try: 5f4791555486c856fdf4b1c782305a589b9cbf25
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-
* [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.
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.
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/tools/compiletest/src/main.rs
136+
TOOL_SOURCE_compiletest := $(S)src/compiletest/compiletest.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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ PKG_FILES := \
5050
$(addprefix $(S)src/, \
5151
bootstrap \
5252
build_helper \
53+
compiletest \
5354
doc \
5455
driver \
5556
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-filecheck $(CFG_LLVM_INST_DIR_$(CFG_BUILD))/bin/FileCheck \
614+
--llvm-bin-path $(CFG_LLVM_INST_DIR_$(CFG_BUILD))/bin \
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:])
338339
args.append('--src')
339340
args.append(rb.rust_root)
340341
args.append('--build')
341342
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: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
// except according to those terms.
1010

1111
use std::fs;
12-
use std::path::PathBuf;
1312

1413
use build::{Build, Compiler};
1514

@@ -50,55 +49,3 @@ pub fn tidy(build: &Build, stage: u32, host: &str) {
5049
build.run(build.tool_cmd(&compiler, "tidy")
5150
.arg(build.src.join("src")));
5251
}
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: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,11 @@ 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"));
2322

2423
for stage in 0..4 {
2524
rm_rf(build, &out.join(format!("stage{}", stage)));
2625
rm_rf(build, &out.join(format!("stage{}-std", stage)));
2726
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)));
3027
}
3128
}
3229
}

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,14 @@ 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-
cargo.env("LLVM_CONFIG", build.llvm_config(target));
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+
}
195202
if build.config.llvm_static_stdcpp {
196203
cargo.env("LLVM_STATIC_STDCPP",
197204
compiler_file(build.cxx(target), "libstdc++.a"));

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

Lines changed: 23 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,29 @@ 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-
debugger_scripts(build, &image, host);
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+
}
199221

200222
// Misc license info
201223
let cp = |file: &str| {
@@ -209,35 +231,6 @@ pub fn rustc(build: &Build, stage: u32, host: &str) {
209231
}
210232
}
211233

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-
241234
pub fn std(build: &Build, compiler: &Compiler, target: &str) {
242235
println!("Dist std stage{} ({} -> {})", compiler.stage, compiler.host,
243236
target);

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ 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+
6570
let cfg_file = m.opt_str("config").map(PathBuf::from).or_else(|| {
6671
if fs::metadata("config.toml").is_ok() {
6772
Some(PathBuf::from("config.toml"))

0 commit comments

Comments
 (0)