Skip to content

Commit 38e5bb9

Browse files
committed
---
yaml --- r: 275615 b: refs/heads/auto c: ea83349 h: refs/heads/master i: 275613: 216e62e 275611: bd03634 275607: b5672a6 275599: d0d0485 275583: 402de5c
1 parent 74d42d1 commit 38e5bb9

File tree

263 files changed

+1209
-5045
lines changed

Some content is hidden

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

263 files changed

+1209
-5045
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
88
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
99
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1010
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11-
refs/heads/auto: e8c0aeb88ba1e12d0c0a1d0ed7b4a90b44460a29
11+
refs/heads/auto: ea83349c9f06e13aae4a70e81d5dc470bf051bca
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

branches/auto/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@
7878
/stage3/
7979
/test/
8080
/tmp/
81-
/obj/
8281
TAGS
8382
TAGS.emacs
8483
TAGS.vi

branches/auto/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ are:
307307
[gsearchdocs]: https://www.google.com/search?q=site:doc.rust-lang.org+your+query+here
308308
[rif]: http://internals.rust-lang.org
309309
[rr]: https://doc.rust-lang.org/book/README.html
310-
[tlgba]: http://tomlee.co/2014/04/a-more-detailed-tour-of-the-rust-compiler/
310+
[tlgba]: http://tomlee.co/2014/04/03/a-more-detailed-tour-of-the-rust-compiler/
311311
[ro]: http://www.rustaceans.org/
312312
[rctd]: ./COMPILER_TESTS.md
313313
[cheatsheet]: http://buildbot.rust-lang.org/homu/

branches/auto/RELEASES.md

Lines changed: 2 additions & 290 deletions
Large diffs are not rendered by default.

branches/auto/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/auto/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/auto/mk/main.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
######################################################################
1414

1515
# The version number
16-
CFG_RELEASE_NUM=1.10.0
16+
CFG_RELEASE_NUM=1.9.0
1717

1818
# An optional number to put after the label, e.g. '.2' -> '-beta.2'
1919
# NB Make sure it starts with a dot to conform to semver pre-release

branches/auto/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/auto/src/bootstrap/Cargo.lock

Lines changed: 2 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

branches/auto/src/bootstrap/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ path = "rustdoc.rs"
2121

2222
[dependencies]
2323
build_helper = { path = "../build_helper" }
24-
cmake = "0.1.17"
24+
cmake = "0.1.10"
2525
filetime = "0.1"
2626
num_cpus = "0.2"
2727
toml = "0.1"
@@ -31,4 +31,3 @@ winapi = "0.2"
3131
kernel32-sys = "0.2"
3232
gcc = "0.3.17"
3333
libc = "0.2"
34-
md5 = "0.1"

branches/auto/src/bootstrap/bootstrap.py

Lines changed: 14 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
import argparse
1212
import contextlib
13-
import hashlib
1413
import os
1514
import shutil
1615
import subprocess
@@ -19,29 +18,13 @@
1918

2019
def get(url, path, verbose=False):
2120
print("downloading " + url)
22-
sha_url = url + ".sha256"
23-
sha_path = path + ".sha256"
24-
for _url, _path in ((url, path), (sha_url, sha_path)):
25-
# see http://serverfault.com/questions/301128/how-to-download
26-
if sys.platform == 'win32':
27-
run(["PowerShell.exe", "/nologo", "-Command",
28-
"(New-Object System.Net.WebClient)"
29-
".DownloadFile('{}', '{}')".format(_url, _path)],
30-
verbose=verbose)
31-
else:
32-
run(["curl", "-o", _path, _url], verbose=verbose)
33-
print("verifying " + path)
34-
with open(path, "rb") as f:
35-
found = hashlib.sha256(f.read()).hexdigest()
36-
with open(sha_path, "r") as f:
37-
expected, _ = f.readline().split()
38-
if found != expected:
39-
err = ("invalid checksum:\n"
40-
" found: {}\n"
41-
" expected: {}".format(found, expected))
42-
if verbose:
43-
raise RuntimeError(err)
44-
sys.exit(err)
21+
# see http://serverfault.com/questions/301128/how-to-download
22+
if sys.platform == 'win32':
23+
run(["PowerShell.exe", "/nologo", "-Command",
24+
"(New-Object System.Net.WebClient).DownloadFile('" + url +
25+
"', '" + path + "')"], verbose=verbose)
26+
else:
27+
run(["curl", "-o", path, url], verbose=verbose)
4528

4629
def unpack(tarball, dst, verbose=False, match=None):
4730
print("extracting " + tarball)
@@ -74,10 +57,9 @@ def run(args, verbose=False):
7457
ret = subprocess.Popen(args)
7558
code = ret.wait()
7659
if code != 0:
77-
err = "failed to run: " + ' '.join(args)
78-
if verbose:
79-
raise RuntimeError(err)
80-
sys.exit(err)
60+
if not verbose:
61+
print("failed to run: " + ' '.join(args))
62+
raise RuntimeError("failed to run command")
8163

8264
class RustBuild:
8365
def download_rust_nightly(self):
@@ -228,10 +210,7 @@ def build_triple(self):
228210
if sys.platform == 'win32':
229211
return 'x86_64-pc-windows-msvc'
230212
else:
231-
err = "uname not found"
232-
if self.verbose:
233-
raise Exception(err)
234-
sys.exit(err)
213+
raise
235214

236215
# Darwin's `uname -s` lies and always returns i386. We have to use
237216
# sysctl instead.
@@ -274,10 +253,7 @@ def build_triple(self):
274253
cputype = 'x86_64'
275254
ostype = 'pc-windows-gnu'
276255
else:
277-
err = "unknown OS type: " + ostype
278-
if self.verbose:
279-
raise ValueError(err)
280-
sys.exit(err)
256+
raise ValueError("unknown OS type: " + ostype)
281257

282258
if cputype in {'i386', 'i486', 'i686', 'i786', 'x86'}:
283259
cputype = 'i686'
@@ -293,10 +269,7 @@ def build_triple(self):
293269
elif cputype in {'amd64', 'x86_64', 'x86-64', 'x64'}:
294270
cputype = 'x86_64'
295271
else:
296-
err = "unknown cpu type: " + cputype
297-
if self.verbose:
298-
raise ValueError(err)
299-
sys.exit(err)
272+
raise ValueError("unknown cpu type: " + cputype)
300273

301274
return cputype + '-' + ostype
302275

@@ -335,11 +308,11 @@ def build_triple(self):
335308

336309
# Run the bootstrap
337310
args = [os.path.join(rb.build_dir, "bootstrap/debug/bootstrap")]
311+
args.extend(sys.argv[1:])
338312
args.append('--src')
339313
args.append(rb.rust_root)
340314
args.append('--build')
341315
args.append(rb.build)
342-
args.extend(sys.argv[1:])
343316
env = os.environ.copy()
344317
env["BOOTSTRAP_PARENT_ID"] = str(os.getpid())
345318
rb.run(args, env)

branches/auto/src/bootstrap/build/channel.rs

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

11-
use std::env;
1211
use std::fs::{self, File};
1312
use std::io::prelude::*;
13+
use std::path::Path;
1414
use std::process::Command;
1515

1616
use build_helper::output;
17-
use md5;
1817

1918
use build::Build;
19+
use build::util::mtime;
2020

2121
pub fn collect(build: &mut Build) {
2222
let mut main_mk = String::new();
@@ -80,8 +80,7 @@ pub fn collect(build: &mut Build) {
8080
build.short_ver_hash = Some(short_ver_hash);
8181
}
8282

83-
let key = md5::compute(build.release.as_bytes());
84-
build.bootstrap_key = format!("{:02x}{:02x}{:02x}{:02x}",
85-
key[0], key[1], key[2], key[3]);
86-
env::set_var("RUSTC_BOOTSTRAP_KEY", &build.bootstrap_key);
83+
build.bootstrap_key = mtime(Path::new("config.toml")).seconds()
84+
.to_string();
8785
}
86+

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

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

11-
use std::fs;
12-
use std::path::PathBuf;
13-
1411
use build::{Build, Compiler};
1512

1613
pub fn linkcheck(build: &Build, stage: u32, host: &str) {
@@ -32,16 +29,9 @@ pub fn cargotest(build: &Build, stage: u32, host: &str) {
3229
let sep = if cfg!(windows) { ";" } else {":" };
3330
let ref newpath = format!("{}{}{}", path.display(), sep, old_path);
3431

35-
// Note that this is a short, cryptic, and not scoped directory name. This
36-
// is currently to minimize the length of path on Windows where we otherwise
37-
// quickly run into path name limit constraints.
38-
let out_dir = build.out.join("ct");
39-
t!(fs::create_dir_all(&out_dir));
40-
4132
build.run(build.tool_cmd(compiler, "cargotest")
42-
.env("PATH", newpath)
43-
.arg(&build.cargo)
44-
.arg(&out_dir));
33+
.env("PATH", newpath)
34+
.arg(&build.cargo));
4535
}
4636

4737
pub fn tidy(build: &Build, stage: u32, host: &str) {
@@ -50,55 +40,3 @@ pub fn tidy(build: &Build, stage: u32, host: &str) {
5040
build.run(build.tool_cmd(&compiler, "tidy")
5141
.arg(build.src.join("src")));
5242
}
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/auto/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/auto/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/auto/src/bootstrap/build/config.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ use toml::{Parser, Decoder, Value};
3131
#[derive(Default)]
3232
pub struct Config {
3333
pub ccache: bool,
34-
pub ninja: bool,
3534
pub verbose: bool,
3635
pub submodules: bool,
3736
pub compiler_docs: bool,
@@ -108,7 +107,6 @@ struct Build {
108107
#[derive(RustcDecodable, Default)]
109108
struct Llvm {
110109
ccache: Option<bool>,
111-
ninja: Option<bool>,
112110
assertions: Option<bool>,
113111
optimize: Option<bool>,
114112
version_check: Option<bool>,
@@ -202,9 +200,9 @@ impl Config {
202200

203201
if let Some(ref llvm) = toml.llvm {
204202
set(&mut config.ccache, llvm.ccache);
205-
set(&mut config.ninja, llvm.ninja);
206203
set(&mut config.llvm_assertions, llvm.assertions);
207204
set(&mut config.llvm_optimize, llvm.optimize);
205+
set(&mut config.llvm_optimize, llvm.optimize);
208206
set(&mut config.llvm_version_check, llvm.version_check);
209207
set(&mut config.llvm_static_stdcpp, llvm.static_libstdcpp);
210208
}

0 commit comments

Comments
 (0)