Skip to content

Commit f16db2f

Browse files
committed
---
yaml --- r: 277075 b: refs/heads/try c: 78ab181 h: refs/heads/master i: 277073: 8c6a556 277071: 6f00e7d
1 parent 7e84921 commit f16db2f

File tree

203 files changed

+3411
-2193
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

+3411
-2193
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: a3329f5452b20fd611537e7db1a86a9fe115008a
4+
refs/heads/try: 78ab18199d69bcc801668bfbeea8190b2c73a939
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: 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/try/RELEASES.md

Lines changed: 496 additions & 0 deletions
Large diffs are not rendered by default.

branches/try/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/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: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,25 @@ pub fn linkcheck(build: &Build, stage: u32, host: &str) {
1818
}
1919

2020
pub fn cargotest(build: &Build, stage: u32, host: &str) {
21+
2122
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+
2232
build.run(build.tool_cmd(compiler, "cargotest")
23-
.env("RUSTC", build.compiler_path(compiler))
24-
.env("RUSTDOC", build.rustdoc(compiler))
33+
.env("PATH", newpath)
2534
.arg(&build.cargo));
2635
}
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};
18+
use build::util::{exe, staticlib, libdir, mtime, is_dylib, copy};
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-
t!(fs::hard_link(&build.compiler_rt_built.borrow()[target],
36-
libdir.join(staticlib("compiler-rt", target))));
35+
copy(&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-
t!(fs::hard_link(&build.compiler_rt_built.borrow()[target],
81-
libdir.join(staticlib("compiler-rt", target))));
80+
copy(&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-
t!(fs::copy(compiler_file(build.cc(target), obj), into.join(obj)));
96+
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-
t!(fs::copy(compiler_file(build.cc(target), obj), into.join(obj)));
122+
copy(&compiler_file(build.cc(target), obj), &into.join(obj));
123123
}
124124
}
125125

@@ -240,9 +240,10 @@ 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) -> String {
244-
output(Command::new(compiler)
245-
.arg(format!("-print-file-name={}", file))).trim().to_string()
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())
246247
}
247248

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

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

287288
// See if rustdoc exists to link it into place
288289
let rustdoc = exe("rustdoc", host);
289290
let rustdoc_src = out_dir.join(&rustdoc);
290291
let rustdoc_dst = bindir.join(&rustdoc);
291292
if fs::metadata(&rustdoc_src).is_ok() {
292293
let _ = fs::remove_file(&rustdoc_dst);
293-
t!(fs::hard_link(&rustdoc_src, &rustdoc_dst));
294+
copy(&rustdoc_src, &rustdoc_dst);
294295
}
295296
}
296297

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

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

Lines changed: 6 additions & 4 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))
55+
.arg(format!("--package-name={}-{}", name, host))
5656
.arg("--component-name=rust-docs")
5757
.arg("--legacy-manifest-dirs=rustlib,cargo")
5858
.arg("--bulk-dirs=share/doc/rust/html");
@@ -61,9 +61,11 @@ 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-
let dst = distdir(build).join("doc").join(&build.package_vers);
65-
t!(fs::create_dir_all(&dst));
66-
cp_r(&src, &dst);
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+
}
6769
}
6870

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

0 commit comments

Comments
 (0)