Skip to content

Commit 7e84921

Browse files
committed
---
yaml --- r: 277074 b: refs/heads/try c: a3329f5 h: refs/heads/master
1 parent 8c6a556 commit 7e84921

File tree

203 files changed

+2205
-3411
lines changed

Some content is hidden

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

203 files changed

+2205
-3411
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: 04b7427bb19c6977e308a3523a7d0f3512471c1d
4+
refs/heads/try: a3329f5452b20fd611537e7db1a86a9fe115008a
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: 0 additions & 496 deletions
Large diffs are not rendered by default.

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: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,9 @@ pub fn linkcheck(build: &Build, stage: u32, host: &str) {
1818
}
1919

2020
pub fn cargotest(build: &Build, stage: u32, host: &str) {
21-
2221
let ref compiler = Compiler::new(stage, host);
23-
24-
// Configure PATH to find the right rustc. NB. we have to use PATH
25-
// and not RUSTC because the Cargo test suite has tests that will
26-
// fail if rustc is not spelled `rustc`.
27-
let path = build.sysroot(compiler).join("bin");
28-
let old_path = ::std::env::var("PATH").expect("");
29-
let sep = if cfg!(windows) { ";" } else {":" };
30-
let ref newpath = format!("{}{}{}", path.display(), sep, old_path);
31-
3222
build.run(build.tool_cmd(compiler, "cargotest")
33-
.env("PATH", newpath)
23+
.env("RUSTC", build.compiler_path(compiler))
24+
.env("RUSTDOC", build.rustdoc(compiler))
3425
.arg(&build.cargo));
3526
}
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/compile.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use std::process::Command;
1515

1616
use build_helper::output;
1717

18-
use build::util::{exe, staticlib, libdir, mtime, is_dylib, copy};
18+
use build::util::{exe, staticlib, libdir, mtime, is_dylib};
1919
use build::{Build, Compiler, Mode};
2020

2121
/// Build the standard library.
@@ -32,8 +32,8 @@ pub fn std<'a>(build: &'a Build, target: &str, compiler: &Compiler<'a>) {
3232
let libdir = build.sysroot_libdir(compiler, target);
3333
let _ = fs::remove_dir_all(&libdir);
3434
t!(fs::create_dir_all(&libdir));
35-
copy(&build.compiler_rt_built.borrow()[target],
36-
&libdir.join(staticlib("compiler-rt", target)));
35+
t!(fs::hard_link(&build.compiler_rt_built.borrow()[target],
36+
libdir.join(staticlib("compiler-rt", target))));
3737

3838
build_startup_objects(build, target, &libdir);
3939

@@ -77,8 +77,8 @@ pub fn std_link(build: &Build,
7777
if host != compiler.host {
7878
let _ = fs::remove_dir_all(&libdir);
7979
t!(fs::create_dir_all(&libdir));
80-
copy(&build.compiler_rt_built.borrow()[target],
81-
&libdir.join(staticlib("compiler-rt", target)));
80+
t!(fs::hard_link(&build.compiler_rt_built.borrow()[target],
81+
libdir.join(staticlib("compiler-rt", target))));
8282
}
8383
add_to_sysroot(&out_dir, &libdir);
8484

@@ -93,7 +93,7 @@ pub fn std_link(build: &Build,
9393
/// Only required for musl targets that statically link to libc
9494
fn copy_third_party_objects(build: &Build, target: &str, into: &Path) {
9595
for &obj in &["crt1.o", "crti.o", "crtn.o"] {
96-
copy(&compiler_file(build.cc(target), obj), &into.join(obj));
96+
t!(fs::copy(compiler_file(build.cc(target), obj), into.join(obj)));
9797
}
9898
}
9999

@@ -119,7 +119,7 @@ fn build_startup_objects(build: &Build, target: &str, into: &Path) {
119119
}
120120

121121
for obj in ["crt2.o", "dllcrt2.o"].iter() {
122-
copy(&compiler_file(build.cc(target), obj), &into.join(obj));
122+
t!(fs::copy(compiler_file(build.cc(target), obj), into.join(obj)));
123123
}
124124
}
125125

@@ -240,10 +240,9 @@ fn libtest_shim(build: &Build, compiler: &Compiler, target: &str) -> PathBuf {
240240
build.cargo_out(compiler, Mode::Libtest, target).join("libtest_shim.rlib")
241241
}
242242

243-
fn compiler_file(compiler: &Path, file: &str) -> PathBuf {
244-
let out = output(Command::new(compiler)
245-
.arg(format!("-print-file-name={}", file)));
246-
PathBuf::from(out.trim())
243+
fn compiler_file(compiler: &Path, file: &str) -> String {
244+
output(Command::new(compiler)
245+
.arg(format!("-print-file-name={}", file))).trim().to_string()
247246
}
248247

249248
/// Prepare a new compiler from the artifacts in `stage`
@@ -271,7 +270,7 @@ pub fn assemble_rustc(build: &Build, stage: u32, host: &str) {
271270
for f in t!(fs::read_dir(&src_libdir)).map(|f| t!(f)) {
272271
let filename = f.file_name().into_string().unwrap();
273272
if is_dylib(&filename) {
274-
copy(&f.path(), &sysroot_libdir.join(&filename));
273+
t!(fs::hard_link(&f.path(), sysroot_libdir.join(&filename)));
275274
}
276275
}
277276

@@ -283,15 +282,15 @@ pub fn assemble_rustc(build: &Build, stage: u32, host: &str) {
283282
t!(fs::create_dir_all(&bindir));
284283
let compiler = build.compiler_path(&Compiler::new(stage, host));
285284
let _ = fs::remove_file(&compiler);
286-
copy(&rustc, &compiler);
285+
t!(fs::hard_link(rustc, compiler));
287286

288287
// See if rustdoc exists to link it into place
289288
let rustdoc = exe("rustdoc", host);
290289
let rustdoc_src = out_dir.join(&rustdoc);
291290
let rustdoc_dst = bindir.join(&rustdoc);
292291
if fs::metadata(&rustdoc_src).is_ok() {
293292
let _ = fs::remove_file(&rustdoc_dst);
294-
copy(&rustdoc_src, &rustdoc_dst);
293+
t!(fs::hard_link(&rustdoc_src, &rustdoc_dst));
295294
}
296295
}
297296

@@ -330,7 +329,8 @@ fn add_to_sysroot(out_dir: &Path, sysroot_dst: &Path) {
330329
let (_, path) = paths.iter().map(|path| {
331330
(mtime(&path).seconds(), path)
332331
}).max().unwrap();
333-
copy(&path, &sysroot_dst.join(path.file_name().unwrap()));
332+
t!(fs::hard_link(&path,
333+
sysroot_dst.join(path.file_name().unwrap())));
334334
}
335335
}
336336

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ pub fn docs(build: &Build, stage: u32, host: &str) {
5252
.arg(format!("--image-dir={}", sanitize_sh(&image)))
5353
.arg(format!("--work-dir={}", sanitize_sh(&tmpdir(build))))
5454
.arg(format!("--output-dir={}", sanitize_sh(&distdir(build))))
55-
.arg(format!("--package-name={}-{}", name, host))
55+
.arg(format!("--package-name={}", name))
5656
.arg("--component-name=rust-docs")
5757
.arg("--legacy-manifest-dirs=rustlib,cargo")
5858
.arg("--bulk-dirs=share/doc/rust/html");
@@ -61,11 +61,9 @@ pub fn docs(build: &Build, stage: u32, host: &str) {
6161

6262
// As part of this step, *also* copy the docs directory to a directory which
6363
// buildbot typically uploads.
64-
if host == build.config.build {
65-
let dst = distdir(build).join("doc").join(&build.package_vers);
66-
t!(fs::create_dir_all(&dst));
67-
cp_r(&src, &dst);
68-
}
64+
let dst = distdir(build).join("doc").join(&build.package_vers);
65+
t!(fs::create_dir_all(&dst));
66+
cp_r(&src, &dst);
6967
}
7068

7169
pub fn mingw(build: &Build, host: &str) {

0 commit comments

Comments
 (0)