Skip to content

Commit b6a0e61

Browse files
committed
---
yaml --- r: 275426 b: refs/heads/auto c: 6a0cfbc h: refs/heads/master
1 parent 55c2b29 commit b6a0e61

File tree

221 files changed

+3419
-2118
lines changed

Some content is hidden

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

221 files changed

+3419
-2118
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: ca1d29c4debb5a58d9c2a9322eea740ca558ade5
11+
refs/heads/auto: 6a0cfbcac294faab2b8bcd95a04cda042101a2d8
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

branches/auto/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
/stage3/
7979
/test/
8080
/tmp/
81+
/obj/
8182
TAGS
8283
TAGS.emacs
8384
TAGS.vi

branches/auto/RELEASES.md

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

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.9.0
16+
CFG_RELEASE_NUM=1.10.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: 9 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -240,52 +240,16 @@ cleantestlibs:
240240
# Tidy
241241
######################################################################
242242

243-
ifdef CFG_NOTIDY
244243
.PHONY: tidy
245-
tidy:
246-
else
247-
248-
# Run the tidy script in multiple parts to avoid huge 'echo' commands
249-
.PHONY: tidy
250-
tidy: tidy-basic tidy-binaries tidy-errors tidy-features
251-
252-
endif
253-
254-
.PHONY: tidy-basic
255-
tidy-basic:
256-
@$(call E, check: formatting)
257-
$(Q) $(CFG_PYTHON) $(S)src/etc/tidy.py $(S)src/
258-
259-
.PHONY: tidy-binaries
260-
tidy-binaries:
261-
@$(call E, check: binaries)
262-
$(Q)find $(S)src -type f \
263-
\( -perm -u+x -or -perm -g+x -or -perm -o+x \) \
264-
-not -name '*.rs' -and -not -name '*.py' \
265-
-and -not -name '*.sh' -and -not -name '*.pp' \
266-
| grep '^$(S)src/jemalloc' -v \
267-
| grep '^$(S)src/libuv' -v \
268-
| grep '^$(S)src/llvm' -v \
269-
| grep '^$(S)src/rt/hoedown' -v \
270-
| grep '^$(S)src/gyp' -v \
271-
| grep '^$(S)src/etc' -v \
272-
| grep '^$(S)src/doc' -v \
273-
| grep '^$(S)src/compiler-rt' -v \
274-
| grep '^$(S)src/libbacktrace' -v \
275-
| grep '^$(S)src/rust-installer' -v \
276-
| grep '^$(S)src/liblibc' -v \
277-
| xargs $(CFG_PYTHON) $(S)src/etc/check-binaries.py
278-
279-
.PHONY: tidy-errors
280-
tidy-errors:
281-
@$(call E, check: extended errors)
282-
$(Q) $(CFG_PYTHON) $(S)src/etc/errorck.py $(S)src/
283-
284-
.PHONY: tidy-features
285-
tidy-features:
286-
@$(call E, check: feature sanity)
287-
$(Q) $(CFG_PYTHON) $(S)src/etc/featureck.py $(S)src/
288-
244+
tidy: $(HBIN0_H_$(CFG_BUILD))/tidy$(X_$(CFG_BUILD))
245+
$(TARGET_RPATH_VAR0_T_$(CFG_BUILD)_H_$(CFG_BUILD)) $< $(S)src
246+
247+
$(HBIN0_H_$(CFG_BUILD))/tidy$(X_$(CFG_BUILD)): \
248+
$(TSREQ0_T_$(CFG_BUILD)_H_$(CFG_BUILD)) \
249+
$(TLIB0_T_$(CFG_BUILD)_H_$(CFG_BUILD))/stamp.std \
250+
$(call rwildcard,$(S)src/tools/tidy/src,*.rs)
251+
$(STAGE0_T_$(CFG_BUILD)_H_$(CFG_BUILD)) $(S)src/tools/tidy/src/main.rs \
252+
--out-dir $(@D) --crate-name tidy
289253

290254
######################################################################
291255
# Sets of tests

branches/auto/src/bootstrap/Cargo.lock

Lines changed: 8 additions & 2 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: 2 additions & 1 deletion
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.10"
24+
cmake = "0.1.17"
2525
filetime = "0.1"
2626
num_cpus = "0.2"
2727
toml = "0.1"
@@ -31,3 +31,4 @@ 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/build/channel.rs

Lines changed: 6 additions & 5 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;
1112
use std::fs::{self, File};
1213
use std::io::prelude::*;
13-
use std::path::Path;
1414
use std::process::Command;
1515

1616
use build_helper::output;
17+
use md5;
1718

1819
use build::Build;
19-
use build::util::mtime;
2020

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

83-
build.bootstrap_key = mtime(Path::new("config.toml")).seconds()
84-
.to_string();
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);
8587
}
86-

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

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

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

1315
pub fn linkcheck(build: &Build, stage: u32, host: &str) {
@@ -29,7 +31,21 @@ pub fn cargotest(build: &Build, stage: u32, host: &str) {
2931
let sep = if cfg!(windows) { ";" } else {":" };
3032
let ref newpath = format!("{}{}{}", path.display(), sep, old_path);
3133

34+
// Note that this is a short, cryptic, and not scoped directory name. This
35+
// is currently to minimize the length of path on Windows where we otherwise
36+
// quickly run into path name limit constraints.
37+
let out_dir = build.out.join("ct");
38+
t!(fs::create_dir_all(&out_dir));
39+
3240
build.run(build.tool_cmd(compiler, "cargotest")
33-
.env("PATH", newpath)
34-
.arg(&build.cargo));
41+
.env("PATH", newpath)
42+
.arg(&build.cargo)
43+
.arg(&out_dir));
44+
}
45+
46+
pub fn tidy(build: &Build, stage: u32, host: &str) {
47+
println!("tidy check stage{} ({})", stage, host);
48+
let compiler = Compiler::new(stage, host);
49+
build.run(build.tool_cmd(&compiler, "tidy")
50+
.arg(build.src.join("src")));
3551
}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ use toml::{Parser, Decoder, Value};
3131
#[derive(Default)]
3232
pub struct Config {
3333
pub ccache: bool,
34+
pub ninja: bool,
3435
pub verbose: bool,
3536
pub submodules: bool,
3637
pub compiler_docs: bool,
@@ -107,6 +108,7 @@ struct Build {
107108
#[derive(RustcDecodable, Default)]
108109
struct Llvm {
109110
ccache: Option<bool>,
111+
ninja: Option<bool>,
110112
assertions: Option<bool>,
111113
optimize: Option<bool>,
112114
version_check: Option<bool>,
@@ -200,9 +202,9 @@ impl Config {
200202

201203
if let Some(ref llvm) = toml.llvm {
202204
set(&mut config.ccache, llvm.ccache);
205+
set(&mut config.ninja, llvm.ninja);
203206
set(&mut config.llvm_assertions, llvm.assertions);
204207
set(&mut config.llvm_optimize, llvm.optimize);
205-
set(&mut config.llvm_optimize, llvm.optimize);
206208
set(&mut config.llvm_version_check, llvm.version_check);
207209
set(&mut config.llvm_static_stdcpp, llvm.static_libstdcpp);
208210
}

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,9 @@ impl Build {
197197
ToolCargoTest { stage } => {
198198
compile::tool(self, stage, target.target, "cargotest");
199199
}
200+
ToolTidy { stage } => {
201+
compile::tool(self, stage, target.target, "tidy");
202+
}
200203
DocBook { stage } => {
201204
doc::rustbook(self, stage, target.target, "book", &doc_out);
202205
}
@@ -230,6 +233,9 @@ impl Build {
230233
CheckCargoTest { stage } => {
231234
check::cargotest(self, stage, target.target);
232235
}
236+
CheckTidy { stage } => {
237+
check::tidy(self, stage, target.target);
238+
}
233239

234240
DistDocs { stage } => dist::docs(self, stage, target.target),
235241
DistMingw { _dummy } => dist::mingw(self, target.target),

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ pub fn llvm(build: &Build, target: &str) {
4343

4444
// http://llvm.org/docs/CMake.html
4545
let mut cfg = cmake::Config::new(build.src.join("src/llvm"));
46+
if build.config.ninja {
47+
cfg.generator("Ninja");
48+
}
4649
cfg.target(target)
4750
.host(&build.config.build)
4851
.out_dir(&dst)

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ pub fn check(build: &mut Build) {
4848
}
4949
}
5050
need_cmd("cmake".as_ref());
51+
if build.config.ninja {
52+
need_cmd("ninja".as_ref())
53+
}
5154
break
5255
}
5356

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

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ macro_rules! targets {
5151
(tool_rustbook, ToolRustbook { stage: u32 }),
5252
(tool_error_index, ToolErrorIndex { stage: u32 }),
5353
(tool_cargotest, ToolCargoTest { stage: u32 }),
54+
(tool_tidy, ToolTidy { stage: u32 }),
5455

5556
// Steps for long-running native builds. Ideally these wouldn't
5657
// actually exist and would be part of build scripts, but for now
@@ -79,6 +80,7 @@ macro_rules! targets {
7980
(check, Check { stage: u32, compiler: Compiler<'a> }),
8081
(check_linkcheck, CheckLinkcheck { stage: u32 }),
8182
(check_cargotest, CheckCargoTest { stage: u32 }),
83+
(check_tidy, CheckTidy { stage: u32 }),
8284

8385
// Distribution targets, creating tarballs
8486
(dist, Dist { stage: u32 }),
@@ -148,7 +150,9 @@ fn top_level(build: &Build) -> Vec<Step> {
148150
src: Source::Llvm { _dummy: () },
149151
target: &build.config.build,
150152
};
151-
targets.push(t.doc(stage));
153+
if build.config.docs {
154+
targets.push(t.doc(stage));
155+
}
152156
for host in build.config.host.iter() {
153157
if !build.flags.host.contains(host) {
154158
continue
@@ -314,18 +318,23 @@ impl<'a> Step<'a> {
314318
vec![self.tool_linkchecker(stage), self.doc(stage)]
315319
}
316320
Source::CheckCargoTest { stage } => {
317-
vec![self.tool_cargotest(stage)]
321+
vec![self.tool_cargotest(stage),
322+
self.librustc(self.compiler(stage))]
323+
}
324+
Source::CheckTidy { stage } => {
325+
vec![self.tool_tidy(stage)]
318326
}
319327

320-
Source::ToolLinkchecker { stage } => {
328+
Source::ToolLinkchecker { stage } |
329+
Source::ToolTidy { stage } => {
321330
vec![self.libstd(self.compiler(stage))]
322331
}
323332
Source::ToolErrorIndex { stage } |
324333
Source::ToolRustbook { stage } => {
325334
vec![self.librustc(self.compiler(stage))]
326335
}
327336
Source::ToolCargoTest { stage } => {
328-
vec![self.librustc(self.compiler(stage))]
337+
vec![self.libstd(self.compiler(stage))]
329338
}
330339

331340
Source::DistDocs { stage } => vec![self.doc(stage)],
@@ -350,7 +359,9 @@ impl<'a> Step<'a> {
350359
let compiler = self.compiler(stage);
351360
for target in build.config.target.iter() {
352361
let target = self.target(target);
353-
base.push(target.dist_docs(stage));
362+
if build.config.docs {
363+
base.push(target.dist_docs(stage));
364+
}
354365
base.push(target.dist_std(compiler));
355366
}
356367
}

branches/auto/src/bootstrap/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ extern crate libc;
2020
extern crate num_cpus;
2121
extern crate rustc_serialize;
2222
extern crate toml;
23+
extern crate md5;
2324

2425
use std::env;
2526

branches/auto/src/bootstrap/mk/Makefile.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,7 @@ check-cargotest:
4242
$(Q)$(BOOTSTRAP) --step check-cargotest
4343
dist:
4444
$(Q)$(BOOTSTRAP) --step dist
45+
tidy:
46+
$(Q)$(BOOTSTRAP) --step check-tidy --stage 0
4547

4648
.PHONY: dist

0 commit comments

Comments
 (0)