Auto merge of #38324 - alexcrichton:fix-nightlies, r=alexcrichton
First attempt at fixing nightlies Looks like we've got a whole slew of bugs on our hands, let's try to fix them all at once.
This commit is contained in:
commit
1336742a1a
20
src/Cargo.lock
generated
20
src/Cargo.lock
generated
@ -19,7 +19,7 @@ version = "0.0.0"
|
||||
dependencies = [
|
||||
"build_helper 0.1.0",
|
||||
"core 0.0.0",
|
||||
"gcc 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gcc 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.0.0",
|
||||
]
|
||||
|
||||
@ -42,7 +42,7 @@ dependencies = [
|
||||
"build_helper 0.1.0",
|
||||
"cmake 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gcc 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gcc 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -63,7 +63,7 @@ name = "cmake"
|
||||
version = "0.1.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"gcc 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gcc 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -80,7 +80,7 @@ name = "compiler_builtins"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"core 0.0.0",
|
||||
"gcc 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gcc 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -121,7 +121,7 @@ name = "flate"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"build_helper 0.1.0",
|
||||
"gcc 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gcc 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -130,7 +130,7 @@ version = "0.0.0"
|
||||
|
||||
[[package]]
|
||||
name = "gcc"
|
||||
version = "0.3.38"
|
||||
version = "0.3.40"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
@ -402,7 +402,7 @@ name = "rustc_llvm"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"build_helper 0.1.0",
|
||||
"gcc 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gcc 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc_bitflags 0.0.0",
|
||||
]
|
||||
|
||||
@ -551,7 +551,7 @@ version = "0.0.0"
|
||||
dependencies = [
|
||||
"arena 0.0.0",
|
||||
"build_helper 0.1.0",
|
||||
"gcc 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gcc 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.0.0",
|
||||
"rustc 0.0.0",
|
||||
"rustc_back 0.0.0",
|
||||
@ -587,7 +587,7 @@ dependencies = [
|
||||
"collections 0.0.0",
|
||||
"compiler_builtins 0.0.0",
|
||||
"core 0.0.0",
|
||||
"gcc 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gcc 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.0.0",
|
||||
"panic_abort 0.0.0",
|
||||
"panic_unwind 0.0.0",
|
||||
@ -677,7 +677,7 @@ dependencies = [
|
||||
"checksum cmake 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "0e5bcf27e097a184c1df4437654ed98df3d7a516e8508a6ba45d8b092bbdf283"
|
||||
"checksum env_logger 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "15abd780e45b3ea4f76b4e9a26ff4843258dd8a3eed2775a0e7368c2e7936c2f"
|
||||
"checksum filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "5363ab8e4139b8568a6237db5248646e5a8a2f89bd5ccb02092182b11fd3e922"
|
||||
"checksum gcc 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)" = "553f11439bdefe755bf366b264820f1da70f3aaf3924e594b886beb9c831bcf5"
|
||||
"checksum gcc 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)" = "872db9e59486ef2b14f8e8c10e9ef02de2bccef6363d7f34835dedb386b3d950"
|
||||
"checksum getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685"
|
||||
"checksum libc 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)" = "044d1360593a78f5c8e5e710beccdc24ab71d1f01bc19a29bcacdba22e8475d8"
|
||||
"checksum log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ab83497bf8bf4ed2a74259c1c802351fcd67a65baa86394b6ba73c36f4838054"
|
||||
|
@ -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;
|
||||
|
||||
@ -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")
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -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));
|
||||
|
2
src/vendor/gcc/.cargo-checksum.json
vendored
2
src/vendor/gcc/.cargo-checksum.json
vendored
@ -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
src/vendor/gcc/.travis.yml
vendored
4
src/vendor/gcc/.travis.yml
vendored
@ -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
|
||||
|
2
src/vendor/gcc/Cargo.toml
vendored
2
src/vendor/gcc/Cargo.toml
vendored
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
|
||||
name = "gcc"
|
||||
version = "0.3.38"
|
||||
version = "0.3.40"
|
||||
authors = ["Alex Crichton <alex@alexcrichton.com>"]
|
||||
license = "MIT/Apache-2.0"
|
||||
repository = "https://github.com/alexcrichton/gcc-rs"
|
||||
|
60
src/vendor/gcc/src/lib.rs
vendored
60
src/vendor/gcc/src/lib.rs
vendored
@ -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()));
|
||||
@ -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 {
|
||||
@ -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());
|
||||
|
||||
@ -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());
|
||||
@ -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"),
|
||||
@ -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())
|
||||
}
|
||||
|
5
src/vendor/gcc/src/windows_registry.rs
vendored
5
src/vendor/gcc/src/windows_registry.rs
vendored
@ -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()
|
||||
}
|
||||
|
3
src/vendor/gcc/tests/support/mod.rs
vendored
3
src/vendor/gcc/tests/support/mod.rs
vendored
@ -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(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user