update gcc crate

Use gcc::Build rather than deprecated gcc::Config.
Fixes #43973
This commit is contained in:
Ralf Jung 2017-09-02 10:54:43 +02:00
parent 204c0a47e7
commit 12d84cc009
9 changed files with 29 additions and 29 deletions

36
src/Cargo.lock generated
View File

@ -47,7 +47,7 @@ dependencies = [
"alloc_system 0.0.0",
"build_helper 0.1.0",
"core 0.0.0",
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.53 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.0.0",
]
@ -103,7 +103,7 @@ name = "backtrace-sys"
version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.53 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -137,7 +137,7 @@ dependencies = [
"build_helper 0.1.0",
"cmake 0.1.24 (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.51 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.53 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)",
@ -270,7 +270,7 @@ name = "cmake"
version = "0.1.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.53 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -286,7 +286,7 @@ name = "compiler_builtins"
version = "0.0.0"
dependencies = [
"core 0.0.0",
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.53 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -397,7 +397,7 @@ name = "curl-sys"
version = "0.3.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.53 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.17 (registry+https://github.com/rust-lang/crates.io-index)",
@ -577,7 +577,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "gcc"
version = "0.3.51"
version = "0.3.53"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@ -837,7 +837,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cmake 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
"curl-sys 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.53 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)",
"libssh2-sys 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
@ -862,7 +862,7 @@ name = "libz-sys"
version = "1.0.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.53 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
@ -883,7 +883,7 @@ version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.53 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -965,7 +965,7 @@ name = "miniz-sys"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.53 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -1101,7 +1101,7 @@ name = "openssl-sys"
version = "0.9.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.53 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
"vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1206,7 +1206,7 @@ name = "profiler_builtins"
version = "0.0.0"
dependencies = [
"core 0.0.0",
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.53 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -1598,7 +1598,7 @@ name = "rustc_llvm"
version = "0.0.0"
dependencies = [
"build_helper 0.1.0",
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.53 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc_bitflags 0.0.0",
]
@ -1728,7 +1728,7 @@ name = "rustc_trans"
version = "0.0.0"
dependencies = [
"flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.53 (registry+https://github.com/rust-lang/crates.io-index)",
"jobserver 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1793,7 +1793,7 @@ version = "0.0.0"
dependencies = [
"build_helper 0.1.0",
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.53 (registry+https://github.com/rust-lang/crates.io-index)",
"html-diff 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"pulldown-cmark 0.0.14 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1966,7 +1966,7 @@ dependencies = [
"collections 0.0.0",
"compiler_builtins 0.0.0",
"core 0.0.0",
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.53 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.0.0",
"panic_abort 0.0.0",
"panic_unwind 0.0.0",
@ -2470,7 +2470,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ab76cfd2aaa59b7bf6688ad9ba15bbae64bff97f04ea02144cfd3443e5c2866"
"checksum futf 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "51f93f3de6ba1794dcd5810b3546d004600a59a98266487c8407bc4b24e398f3"
"checksum futures 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "a82bdc62350ca9d7974c760e9665102fc9d740992a528c2254aa930e53b783c4"
"checksum gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)" = "120d07f202dcc3f72859422563522b66fe6463a4c513df062874daad05f85f0a"
"checksum gcc 0.3.53 (registry+https://github.com/rust-lang/crates.io-index)" = "e8310f7e9c890398b0e80e301c4f474e9918d2b27fca8f48486ca775fa9ffc5a"
"checksum getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685"
"checksum git2 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0c1c0203d653f4140241da0c1375a404f0a397249ec818cd2076c6280c50f6fa"
"checksum git2-curl 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "68676bc784bf0bef83278898929bf64a251e87c0340723d0b93fa096c9c5bf8e"

View File

@ -18,7 +18,7 @@ fn main() {
// Locate the actual compiler that we're invoking
env::remove_var("CC");
env::remove_var("CXX");
let mut cfg = gcc::Config::new();
let mut cfg = gcc::Build::new();
cfg.cargo_metadata(false)
.out_dir("/")
.target(&target)

View File

@ -45,7 +45,7 @@ pub fn find(build: &mut Build) {
// For all targets we're going to need a C compiler for building some shims
// and such as well as for being a linker for Rust code.
for target in build.targets.iter().chain(&build.hosts).cloned().chain(iter::once(build.build)) {
let mut cfg = gcc::Config::new();
let mut cfg = gcc::Build::new();
cfg.cargo_metadata(false).opt_level(0).debug(false)
.target(&target).host(&build.build);
@ -67,7 +67,7 @@ pub fn find(build: &mut Build) {
// For all host triples we need to find a C++ compiler as well
for host in build.hosts.iter().cloned().chain(iter::once(build.build)) {
let mut cfg = gcc::Config::new();
let mut cfg = gcc::Build::new();
cfg.cargo_metadata(false).opt_level(0).debug(false).cpp(true)
.target(&host).host(&build.build);
let config = build.config.target_config.get(&host);
@ -82,7 +82,7 @@ pub fn find(build: &mut Build) {
}
}
fn set_compiler(cfg: &mut gcc::Config,
fn set_compiler(cfg: &mut gcc::Build,
gnu_compiler: &str,
target: Interned<String>,
config: Option<&Target>,

View File

@ -289,7 +289,7 @@ impl Step for TestHelpers {
let _folder = build.fold_output(|| "build_test_helpers");
println!("Building test helpers");
t!(fs::create_dir_all(&dst));
let mut cfg = gcc::Config::new();
let mut cfg = gcc::Build::new();
// We may have found various cross-compilers a little differently due to our
// extra configuration, so inform gcc of these compilers. Note, though, that

View File

@ -63,7 +63,7 @@ fn main() {
_ => return,
};
let compiler = gcc::Config::new().get_compiler();
let compiler = gcc::Build::new().get_compiler();
// only msvc returns None for ar so unwrap is okay
let ar = build_helper::cc2ar(compiler.path(), &target).unwrap();
let cflags = compiler.args()
@ -150,7 +150,7 @@ fn main() {
// sure the symbols are available.
if target.contains("androideabi") {
println!("cargo:rerun-if-changed=pthread_atfork_dummy.c");
gcc::Config::new()
gcc::Build::new()
.flag("-fvisibility=hidden")
.file("pthread_atfork_dummy.c")
.compile("libpthread_atfork_dummy.a");

View File

@ -19,7 +19,7 @@ use std::path::Path;
fn main() {
let target = env::var("TARGET").expect("TARGET was not set");
let cfg = &mut gcc::Config::new();
let cfg = &mut gcc::Build::new();
let mut profile_sources = vec!["GCDAProfiling.c",
"InstrProfiling.c",

View File

@ -136,7 +136,7 @@ fn main() {
let mut cmd = Command::new(&llvm_config);
cmd.arg("--cxxflags");
let cxxflags = output(&mut cmd);
let mut cfg = gcc::Config::new();
let mut cfg = gcc::Build::new();
for flag in cxxflags.split_whitespace() {
// Ignore flags like `-m64` when we're doing a cross build
if is_crossed && flag.starts_with("-m") {

View File

@ -14,7 +14,7 @@ extern crate gcc;
fn main() {
let src_dir = std::path::Path::new("../rt/hoedown/src");
build_helper::rerun_if_changed_anything_in_dir(src_dir);
let mut cfg = gcc::Config::new();
let mut cfg = gcc::Build::new();
cfg.file("../rt/hoedown/src/autolink.c")
.file("../rt/hoedown/src/buffer.c")
.file("../rt/hoedown/src/document.c")

View File

@ -77,7 +77,7 @@ fn main() {
fn build_libbacktrace(host: &str, target: &str) -> Result<(), ()> {
let native = native_lib_boilerplate("libbacktrace", "libbacktrace", "backtrace", ".libs")?;
let compiler = gcc::Config::new().get_compiler();
let compiler = gcc::Build::new().get_compiler();
// only msvc returns None for ar so unwrap is okay
let ar = build_helper::cc2ar(compiler.path(), target).unwrap();
let mut cflags = compiler.args().iter().map(|s| s.to_str().unwrap())