Skip to content

First attempt at fixing nightlies #38324

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/bootstrap/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//! `package_vers`, and otherwise indicating to the compiler what it should
//! print out as part of its version information.

use std::fs::{self, File};
use std::fs::File;
use std::io::prelude::*;
use std::process::Command;

Expand Down Expand Up @@ -69,7 +69,7 @@ pub fn collect(build: &mut Build) {

// If we have a git directory, add in some various SHA information of what
// commit this compiler was compiled from.
if fs::metadata(build.src.join(".git")).is_ok() {
if build.src.join(".git").is_dir() {
let ver_date = output(Command::new("git").current_dir(&build.src)
.arg("log").arg("-1")
.arg("--date=short")
Expand Down
1 change: 1 addition & 0 deletions src/bootstrap/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ fn markdown_test(build: &Build, compiler: &Compiler, markdown: &Path) {
build.add_rust_test_threads(&mut cmd);
cmd.arg("--test");
cmd.arg(markdown);
cmd.env("RUSTC_BOOTSTRAP", "1");

let mut test_args = build.flags.cmd.test_args().join(" ");
if build.config.quiet_tests {
Expand Down
7 changes: 0 additions & 7 deletions src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,13 +324,6 @@ pub fn analysis(build: &Build, compiler: &Compiler, target: &str) {
.arg("--legacy-manifest-dirs=rustlib,cargo");
build.run(&mut cmd);
t!(fs::remove_dir_all(&image));

// Create plain source tarball
let mut cmd = Command::new("tar");
cmd.arg("-czf").arg(sanitize_sh(&distdir(build).join(&format!("{}.tar.gz", name))))
.arg("analysis")
.current_dir(&src);
build.run(&mut cmd);
}

/// Creates the `rust-src` installer component and the plain source tarball
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/step.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ pub fn build_rules(build: &Build) -> Rules {
.default(true)
.dep(|s| s.name("default:doc"))
.run(move |s| dist::docs(build, s.stage, s.target));
rules.dist("dist-analysis", "src/libstd")
rules.dist("dist-analysis", "analysis")
.dep(|s| s.name("dist-std"))
.default(true)
.run(move |s| dist::analysis(build, &s.compiler(), s.target));
Expand Down
2 changes: 1 addition & 1 deletion src/vendor/gcc/.cargo-checksum.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".gitignore":"f9b1ca6ae27d1c18215265024629a8960c31379f206d9ed20f64e0b2dcf79805",".travis.yml":"5cee7774cf6d876246a0ae0f8362cceeecec5924b751049c945faac9342565ff","Cargo.toml":"2634dedd87889b33a794e31b41a8d8d4713ef40382be3d464229707679bd83da","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"ecb2d93f4c81edbd48d8742ff7887dc0a4530a5890967839090bbc972d49bebe","appveyor.yml":"46c77d913eaa45871296942c2cd96ef092c9dcaf19201cb5c500a5107faeb06f","src/bin/gcc-shim.rs":"11edfe1fc6f932bd42ffffda5145833302bc163e0b87dc0d54f4bd0997ad4708","src/lib.rs":"5eb0e311367226ed0420f5e2dac10cc35fc0a3be639a612b6e8ea6d24f646634","src/registry.rs":"3e2a42581ebb82e325dd5600c6571cef937b35003b2927dc618967f5238a2058","src/windows_registry.rs":"906653c020ffe9d572e435f3fc3a8892d9e0a13240ba297db01ce0a288e08cdb","tests/cc_env.rs":"d92c5e3d3d43ac244e63b2cd2c93a521fcf124bf1ccf8d4c6bfa7f8333d88976","tests/support/mod.rs":"d11ed0db4dda5ecf5fb970c9b0c56428cd47421a2742f07032e2cc6b0a0f07e2","tests/test.rs":"164220f11be2eebc20315826513999970660a82feff8cc4b15b4e9d73d98324e"},"package":"553f11439bdefe755bf366b264820f1da70f3aaf3924e594b886beb9c831bcf5"}
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".gitignore":"f9b1ca6ae27d1c18215265024629a8960c31379f206d9ed20f64e0b2dcf79805",".travis.yml":"675ffe583db77282d010306f29e6d81e5070ab081deddd0300137dfbd2cb83de","Cargo.toml":"19bb617b74de761515ef5d087fd0e30912fda1d7c22fd04fa211236dab99a509","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"ecb2d93f4c81edbd48d8742ff7887dc0a4530a5890967839090bbc972d49bebe","appveyor.yml":"46c77d913eaa45871296942c2cd96ef092c9dcaf19201cb5c500a5107faeb06f","src/bin/gcc-shim.rs":"11edfe1fc6f932bd42ffffda5145833302bc163e0b87dc0d54f4bd0997ad4708","src/lib.rs":"7e7c60beccfdd145e876da81bb07dd09c5248dab0b26d93190bab4242799d51a","src/registry.rs":"3e2a42581ebb82e325dd5600c6571cef937b35003b2927dc618967f5238a2058","src/windows_registry.rs":"1f4211caec5a192b5f05c8a47efb27aa6a0ab976c659b9318a0cf603a28d6746","tests/cc_env.rs":"d92c5e3d3d43ac244e63b2cd2c93a521fcf124bf1ccf8d4c6bfa7f8333d88976","tests/support/mod.rs":"f4dad5a8133c3dd6678d9a3de057b82e624ef547b9b3e4ac9508a48962fc387b","tests/test.rs":"164220f11be2eebc20315826513999970660a82feff8cc4b15b4e9d73d98324e"},"package":"872db9e59486ef2b14f8e8c10e9ef02de2bccef6363d7f34835dedb386b3d950"}
4 changes: 3 additions & 1 deletion src/vendor/gcc/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ script:
- cargo test --manifest-path gcc-test/Cargo.toml --target $TARGET --features parallel
- cargo test --manifest-path gcc-test/Cargo.toml --target $TARGET --release
- cargo doc
- cargo clean && cargo build
- rustdoc --test README.md -L target/debug -L target/debug/deps
after_success:
- travis-cargo --only nightly doc-upload
env:
global:
secure: ilbcq9zX+UaiBcwqkBGldeanbEQus9npLsi0/nF1PUxKbQsoWSVtVOehAD8Hy92D3hX2npIRyNL8GxBn85XEcBYc1h7DiWUhLcXfZie79v8Ly/qboHCfZLXlB1ofbypbyQfouEdOE9zHf0ZILYVpAgUkliv6KuVShsrKNlbn4QE=
secure: "CBtqrudgE0PS8x3kTr44jKbC2D4nfnmdYVecooNm0qnER4B4TSvZpZSQoCgKK6k4BYQuOSyFTOwYx6M79w39ZMOgyCP9ytB+tyMWL0/+ZuUQL04yVg4M5vd3oJMkOaXbvG56ncgPyFrseY+FPDg+mXAzvJk/nily37YXjkQj2D0="

matrix:
- ARCH=x86_64
- ARCH=i686
Expand Down
2 changes: 1 addition & 1 deletion src/vendor/gcc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]

name = "gcc"
version = "0.3.38"
version = "0.3.40"
authors = ["Alex Crichton <[email protected]>"]
license = "MIT/Apache-2.0"
repository = "https://github.com/alexcrichton/gcc-rs"
Expand Down
60 changes: 54 additions & 6 deletions src/vendor/gcc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,23 @@ impl Config {
self.compile_objects(&src_dst);
self.assemble(lib_name, &dst.join(output), &objects);

if self.get_target().contains("msvc") {
let compiler = self.get_base_compiler();
let atlmfc_lib = compiler.env().iter().find(|&&(ref var, _)| {
var == OsStr::new("LIB")
}).and_then(|&(_, ref lib_paths)| {
env::split_paths(lib_paths).find(|path| {
let sub = Path::new("atlmfc/lib");
path.ends_with(sub) || path.parent().map_or(false, |p| p.ends_with(sub))
})
});

if let Some(atlmfc_lib) = atlmfc_lib {
self.print(&format!("cargo:rustc-link-search=native={}",
atlmfc_lib.display()));
}
}

self.print(&format!("cargo:rustc-link-lib=static={}",
&output[3..output.len() - 2]));
self.print(&format!("cargo:rustc-link-search=native={}", dst.display()));
Expand Down Expand Up @@ -446,17 +463,20 @@ impl Config {

if msvc {
cmd.args.push("/nologo".into());
cmd.args.push("/MD".into()); // link against msvcrt.dll for now
let features = env::var("CARGO_CFG_TARGET_FEATURE")
.unwrap_or(String::new());
if features.contains("crt-static") {
cmd.args.push("/MT".into());
} else {
cmd.args.push("/MD".into());
}
match &opt_level[..] {
"z" | "s" => cmd.args.push("/Os".into()),
"2" => cmd.args.push("/O2".into()),
"1" => cmd.args.push("/O1".into()),
_ => {}
}
if target.contains("i686") {
cmd.args.push("/SAFESEH".into());
} else if target.contains("i586") {
cmd.args.push("/SAFESEH".into());
if target.contains("i586") {
cmd.args.push("/ARCH:IA32".into());
}
} else if nvcc {
Expand Down Expand Up @@ -489,27 +509,48 @@ impl Config {
cmd.args.push("-Xcompiler".into());
cmd.args.push("\'-fPIC\'".into());
}

if target.contains("musl") {
cmd.args.push("-static".into());
}

// armv7 targets get to use armv7 instructions
if target.starts_with("armv7-unknown-linux-") {
cmd.args.push("-march=armv7-a".into());
}

// On android we can guarantee some extra float instructions
// (specified in the android spec online)
if target.starts_with("armv7-linux-androideabi") {
cmd.args.push("-march=armv7-a".into());
cmd.args.push("-mfpu=vfpv3-d16".into());
}

// For us arm == armv6 by default
if target.starts_with("arm-unknown-linux-") {
cmd.args.push("-march=armv6".into());
cmd.args.push("-marm".into());
}

// Turn codegen down on i586 to avoid some instructions.
if target.starts_with("i586-unknown-linux-") {
cmd.args.push("-march=pentium".into());
}

// Set codegen level for i686 correctly
if target.starts_with("i686-unknown-linux-") {
cmd.args.push("-march=i686".into());
}

// Looks like `musl-gcc` makes is hard for `-m32` to make its way
// all the way to the linker, so we need to actually instruct the
// linker that we're generating 32-bit executables as well. This'll
// typically only be used for build scripts which transitively use
// these flags that try to compile executables.
if target == "i686-unknown-linux-musl" {
cmd.args.push("-Wl,-melf_i386".into());
}

if target.starts_with("thumb") {
cmd.args.push("-mthumb".into());

Expand All @@ -518,10 +559,14 @@ impl Config {
}
}
if target.starts_with("thumbv6m") {
cmd.args.push("-march=armv6-m".into());
cmd.args.push("-march=armv6s-m".into());
}
if target.starts_with("thumbv7em") {
cmd.args.push("-march=armv7e-m".into());

if target.ends_with("eabihf") {
cmd.args.push("-mfpu=fpv4-sp-d16".into())
}
}
if target.starts_with("thumbv7m") {
cmd.args.push("-march=armv7-m".into());
Expand Down Expand Up @@ -739,6 +784,7 @@ impl Config {
"powerpc64-unknown-linux-gnu" => Some("powerpc-linux-gnu"),
"powerpc64le-unknown-linux-gnu" => Some("powerpc64le-linux-gnu"),
"s390x-unknown-linux-gnu" => Some("s390x-linux-gnu"),
"sparc64-unknown-netbsd" => Some("sparc64--netbsd"),
"thumbv6m-none-eabi" => Some("arm-none-eabi"),
"thumbv7em-none-eabi" => Some("arm-none-eabi"),
"thumbv7em-none-eabihf" => Some("arm-none-eabi"),
Expand Down Expand Up @@ -805,6 +851,8 @@ impl Config {
None
} else if target.contains("darwin") {
Some("c++".to_string())
} else if target.contains("freebsd") {
Some("c++".to_string())
} else {
Some("stdc++".to_string())
}
Expand Down
5 changes: 5 additions & 0 deletions src/vendor/gcc/src/windows_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,11 @@ pub fn find_tool(target: &str, tool: &str) -> Option<Tool> {
let sub = otry!(vc_lib_subdir(target));
tool.libs.push(path.join("lib").join(sub));
tool.include.push(path.join("include"));
let atlmfc_path = path.join("atlmfc");
if atlmfc_path.exists() {
tool.libs.push(atlmfc_path.join("lib").join(sub));
tool.include.push(atlmfc_path.join("include"));
}
Some(tool)
}).next()
}
Expand Down
3 changes: 3 additions & 0 deletions src/vendor/gcc/tests/support/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ impl Test {
pub fn new() -> Test {
let mut gcc = PathBuf::from(env::current_exe().unwrap());
gcc.pop();
if gcc.ends_with("deps") {
gcc.pop();
}
gcc.push(format!("gcc-shim{}", env::consts::EXE_SUFFIX));
Test {
td: TempDir::new("gcc-test").unwrap(),
Expand Down