Skip to content

Commit 24d0fe9

Browse files
committed
---
yaml --- r: 277112 b: refs/heads/try c: 3d50ad7 h: refs/heads/master
1 parent 5c985f7 commit 24d0fe9

File tree

150 files changed

+1646
-2404
lines changed

Some content is hidden

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

150 files changed

+1646
-2404
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: 74b3684d009c0e243a282c9a573ef5e29a2681d9
4+
refs/heads/try: 3d50ad733229ecc9a8412cf372370aa0be1213d8
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/.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/try/RELEASES.md

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

branches/try/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/try/mk/tests.mk

Lines changed: 45 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -240,16 +240,52 @@ cleantestlibs:
240240
# Tidy
241241
######################################################################
242242

243+
ifdef CFG_NOTIDY
243244
.PHONY: tidy
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
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+
253289

254290
######################################################################
255291
# Sets of tests

branches/try/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/try/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/try/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/try/src/bootstrap/build/check.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,3 @@ pub fn cargotest(build: &Build, stage: u32, host: &str) {
3333
.env("PATH", newpath)
3434
.arg(&build.cargo));
3535
}
36-
37-
pub fn tidy(build: &Build, stage: u32, host: &str) {
38-
println!("tidy check stage{} ({})", stage, host);
39-
let compiler = Compiler::new(stage, host);
40-
build.run(build.tool_cmd(&compiler, "tidy")
41-
.arg(build.src.join("src")));
42-
}

branches/try/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
}

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,6 @@ 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-
}
203200
DocBook { stage } => {
204201
doc::rustbook(self, stage, target.target, "book", &doc_out);
205202
}
@@ -233,9 +230,6 @@ impl Build {
233230
CheckCargoTest { stage } => {
234231
check::cargotest(self, stage, target.target);
235232
}
236-
CheckTidy { stage } => {
237-
check::tidy(self, stage, target.target);
238-
}
239233

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

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ 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-
}
4946
cfg.target(target)
5047
.host(&build.config.build)
5148
.out_dir(&dst)

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ 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-
}
5451
break
5552
}
5653

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

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ 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 }),
5554

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

8583
// Distribution targets, creating tarballs
8684
(dist, Dist { stage: u32 }),
@@ -150,9 +148,7 @@ fn top_level(build: &Build) -> Vec<Step> {
150148
src: Source::Llvm { _dummy: () },
151149
target: &build.config.build,
152150
};
153-
if build.config.docs {
154-
targets.push(t.doc(stage));
155-
}
151+
targets.push(t.doc(stage));
156152
for host in build.config.host.iter() {
157153
if !build.flags.host.contains(host) {
158154
continue
@@ -320,12 +316,8 @@ impl<'a> Step<'a> {
320316
Source::CheckCargoTest { stage } => {
321317
vec![self.tool_cargotest(stage)]
322318
}
323-
Source::CheckTidy { stage } => {
324-
vec![self.tool_tidy(stage)]
325-
}
326319

327-
Source::ToolLinkchecker { stage } |
328-
Source::ToolTidy { stage } => {
320+
Source::ToolLinkchecker { stage } => {
329321
vec![self.libstd(self.compiler(stage))]
330322
}
331323
Source::ToolErrorIndex { stage } |
@@ -358,9 +350,7 @@ impl<'a> Step<'a> {
358350
let compiler = self.compiler(stage);
359351
for target in build.config.target.iter() {
360352
let target = self.target(target);
361-
if build.config.docs {
362-
base.push(target.dist_docs(stage));
363-
}
353+
base.push(target.dist_docs(stage));
364354
base.push(target.dist_std(compiler));
365355
}
366356
}

branches/try/src/bootstrap/main.rs

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

2524
use std::env;
2625

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,5 @@ 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
4745

4846
.PHONY: dist

branches/try/src/compiletest/runtest.rs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -868,11 +868,27 @@ fn cleanup_debug_info_options(options: &Option<String>) -> Option<String> {
868868
"-g".to_owned(),
869869
"--debuginfo".to_owned()
870870
];
871-
let new_options =
871+
let mut new_options =
872872
split_maybe_args(options).into_iter()
873873
.filter(|x| !options_to_remove.contains(x))
874874
.collect::<Vec<String>>();
875875

876+
let mut i = 0;
877+
while i + 1 < new_options.len() {
878+
if new_options[i] == "-Z" {
879+
// FIXME #31005 MIR missing debuginfo currently.
880+
if new_options[i + 1] == "orbit" {
881+
// Remove "-Z" and "orbit".
882+
new_options.remove(i);
883+
new_options.remove(i);
884+
continue;
885+
}
886+
// Always skip over -Z's argument.
887+
i += 1;
888+
}
889+
i += 1;
890+
}
891+
876892
Some(new_options.join(" "))
877893
}
878894

branches/try/src/doc/book/guessing-game.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,8 @@ fn main() {
988988
989989
# Complete!
990990
991-
This project showed you a lot: `let`, `match`, methods, associated
992-
functions, using external crates, and more.
993-
994991
At this point, you have successfully built the Guessing Game! Congratulations!
992+
993+
This first project showed you a lot: `let`, `match`, methods, associated
994+
functions, using external crates, and more. Our next project will show off
995+
even more.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env python
2+
#
3+
# Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
4+
# file at the top-level directory of this distribution and at
5+
# http://rust-lang.org/COPYRIGHT.
6+
#
7+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
8+
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
9+
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
10+
# option. This file may not be copied, modified, or distributed
11+
# except according to those terms.
12+
13+
import sys
14+
15+
offenders = sys.argv[1:]
16+
if len(offenders) > 0:
17+
print("Binaries checked into src:")
18+
for offender in offenders:
19+
print(offender)
20+
sys.exit(1)

0 commit comments

Comments
 (0)