about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-09-22 21:34:27 -0700
committerAlex Crichton <alex@alexcrichton.com>2017-09-28 07:45:50 -0700
commit7694ca419b3ade48e22982b69dec90eb45d8da73 (patch)
tree6d6042991fef7c098f7b2ee773d5aacb66de2851
parent041d3550f6d963144722094edfccb3e4e3b74114 (diff)
downloadrust-7694ca419b3ade48e22982b69dec90eb45d8da73.tar.gz
rust-7694ca419b3ade48e22982b69dec90eb45d8da73.zip
Update to the `cc` crate
This is the name the `gcc` crate has moved to
-rw-r--r--src/Cargo.lock20
-rw-r--r--src/Cargo.toml1
-rw-r--r--src/bootstrap/Cargo.toml2
-rw-r--r--src/bootstrap/bin/sccache-plus-cl.rs4
-rw-r--r--src/bootstrap/cc_detect.rs (renamed from src/bootstrap/cc.rs)10
-rw-r--r--src/bootstrap/lib.rs12
-rw-r--r--src/bootstrap/native.rs4
-rw-r--r--src/bootstrap/tool.rs4
-rw-r--r--src/liballoc_jemalloc/Cargo.toml2
-rw-r--r--src/liballoc_jemalloc/build.rs6
-rw-r--r--src/libprofiler_builtins/Cargo.toml2
-rw-r--r--src/libprofiler_builtins/build.rs4
-rw-r--r--src/librustc/session/config.rs28
-rw-r--r--src/librustc_llvm/Cargo.toml2
-rw-r--r--src/librustc_llvm/build.rs4
-rw-r--r--src/librustc_trans/Cargo.toml2
-rw-r--r--src/librustc_trans/back/link.rs2
-rw-r--r--src/librustc_trans/lib.rs2
-rw-r--r--src/librustdoc/Cargo.toml2
-rw-r--r--src/librustdoc/build.rs4
-rw-r--r--src/libstd/Cargo.toml2
-rw-r--r--src/libstd/build.rs4
22 files changed, 66 insertions, 57 deletions
diff --git a/src/Cargo.lock b/src/Cargo.lock
index a8def85baeb..c77be5154d3 100644
--- a/src/Cargo.lock
+++ b/src/Cargo.lock
@@ -42,8 +42,8 @@ dependencies = [
  "alloc 0.0.0",
  "alloc_system 0.0.0",
  "build_helper 0.1.0",
+ "cc 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "core 0.0.0",
- "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.0.0",
 ]
 
@@ -136,9 +136,9 @@ name = "bootstrap"
 version = "0.0.0"
 dependencies = [
  "build_helper 0.1.0",
+ "cc 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "cmake 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)",
  "filetime 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
- "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)",
  "getopts 0.2.15 (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.31 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1221,8 +1221,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 name = "profiler_builtins"
 version = "0.0.0"
 dependencies = [
+ "cc 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "core 0.0.0",
- "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -1628,7 +1628,7 @@ version = "0.0.0"
 dependencies = [
  "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "build_helper 0.1.0",
- "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cc 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc_cratesio_shim 0.0.0",
 ]
 
@@ -1759,8 +1759,8 @@ name = "rustc_trans"
 version = "0.0.0"
 dependencies = [
  "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cc 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
- "gcc 0.3.54 (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)",
@@ -1786,7 +1786,7 @@ name = "rustc_trans_utils"
 version = "0.0.0"
 dependencies = [
  "ar 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)",
+ "flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc 0.0.0",
@@ -1828,8 +1828,8 @@ name = "rustdoc"
 version = "0.0.0"
 dependencies = [
  "build_helper 0.1.0",
+ "cc 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "gcc 0.3.54 (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)",
@@ -1998,10 +1998,10 @@ dependencies = [
  "alloc_jemalloc 0.0.0",
  "alloc_system 0.0.0",
  "build_helper 0.1.0",
+ "cc 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "collections 0.0.0",
  "compiler_builtins 0.0.0",
  "core 0.0.0",
- "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.0.0",
  "panic_abort 0.0.0",
  "panic_unwind 0.0.0",
@@ -2321,6 +2321,10 @@ version = "0.0.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
+name = "unicødë"
+version = "0.1.0"
+
+[[package]]
 name = "unreachable"
 version = "0.1.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/src/Cargo.toml b/src/Cargo.toml
index 2208f389638..f4b4189e01f 100644
--- a/src/Cargo.toml
+++ b/src/Cargo.toml
@@ -38,6 +38,7 @@ members = [
   "tools/rls/test_data/infer_custom_bin",
   "tools/rls/test_data/infer_lib",
   "tools/rls/test_data/omit_init_build",
+  "tools/rls/test_data/unicødë",
   "tools/rls/test_data/workspace_symbol",
 ]
 
diff --git a/src/bootstrap/Cargo.toml b/src/bootstrap/Cargo.toml
index 85e3b65c195..3f1d03b1872 100644
--- a/src/bootstrap/Cargo.toml
+++ b/src/bootstrap/Cargo.toml
@@ -34,7 +34,7 @@ cmake = "0.1.23"
 filetime = "0.1"
 num_cpus = "1.0"
 getopts = "0.2"
-gcc = "0.3.54"
+cc = "1.0"
 libc = "0.2"
 serde = "1.0.8"
 serde_derive = "1.0.8"
diff --git a/src/bootstrap/bin/sccache-plus-cl.rs b/src/bootstrap/bin/sccache-plus-cl.rs
index 266dffa5c92..8584014d48d 100644
--- a/src/bootstrap/bin/sccache-plus-cl.rs
+++ b/src/bootstrap/bin/sccache-plus-cl.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-extern crate gcc;
+extern crate cc;
 
 use std::env;
 use std::process::{self, Command};
@@ -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::Build::new();
+    let mut cfg = cc::Build::new();
     cfg.cargo_metadata(false)
        .out_dir("/")
        .target(&target)
diff --git a/src/bootstrap/cc.rs b/src/bootstrap/cc_detect.rs
index c77e609d70b..08df65c7611 100644
--- a/src/bootstrap/cc.rs
+++ b/src/bootstrap/cc_detect.rs
@@ -23,7 +23,7 @@
 //! 6. "cc"
 //!
 //! Some of this logic is implemented here, but much of it is farmed out to the
-//! `gcc` crate itself, so we end up having the same fallbacks as there.
+//! `cc` crate itself, so we end up having the same fallbacks as there.
 //! Similar logic is then used to find a C++ compiler, just some s/cc/c++/ is
 //! used.
 //!
@@ -35,7 +35,7 @@ use std::process::Command;
 use std::iter;
 
 use build_helper::{cc2ar, output};
-use gcc;
+use cc;
 
 use Build;
 use config::Target;
@@ -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::Build::new();
+        let mut cfg = cc::Build::new();
         cfg.cargo_metadata(false).opt_level(0).warnings(false).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::Build::new();
+        let mut cfg = cc::Build::new();
         cfg.cargo_metadata(false).opt_level(0).warnings(false).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::Build,
+fn set_compiler(cfg: &mut cc::Build,
                 gnu_compiler: &str,
                 target: Interned<String>,
                 config: Option<&Target>,
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index 06c7c4c2faf..83aa08366df 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -126,7 +126,7 @@ extern crate lazy_static;
 extern crate serde_json;
 extern crate cmake;
 extern crate filetime;
-extern crate gcc;
+extern crate cc;
 extern crate getopts;
 extern crate num_cpus;
 extern crate toml;
@@ -148,7 +148,7 @@ use build_helper::{run_silent, run_suppressed, try_run_silent, try_run_suppresse
 
 use util::{exe, libdir, OutputFolder, CiEnv};
 
-mod cc;
+mod cc_detect;
 mod channel;
 mod check;
 mod clean;
@@ -241,9 +241,9 @@ pub struct Build {
 
     // Runtime state filled in later on
     // target -> (cc, ar)
-    cc: HashMap<Interned<String>, (gcc::Tool, Option<PathBuf>)>,
+    cc: HashMap<Interned<String>, (cc::Tool, Option<PathBuf>)>,
     // host -> (cc, ar)
-    cxx: HashMap<Interned<String>, gcc::Tool>,
+    cxx: HashMap<Interned<String>, cc::Tool>,
     crates: HashMap<Interned<String>, Crate>,
     is_sudo: bool,
     ci_env: CiEnv,
@@ -350,7 +350,7 @@ impl Build {
         }
 
         self.verbose("finding compilers");
-        cc::find(self);
+        cc_detect::find(self);
         self.verbose("running sanity check");
         sanity::check(self);
         // If local-rust is the same major.minor as the current version, then force a local-rebuild
@@ -619,7 +619,7 @@ impl Build {
     /// specified.
     fn cflags(&self, target: Interned<String>) -> Vec<String> {
         // Filter out -O and /O (the optimization flags) that we picked up from
-        // gcc-rs because the build scripts will determine that for themselves.
+        // cc-rs because the build scripts will determine that for themselves.
         let mut base = self.cc[&target].0.args().iter()
                            .map(|s| s.to_string_lossy().into_owned())
                            .filter(|s| !s.starts_with("-O") && !s.starts_with("/O"))
diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
index 99077d03dbe..29376ff25e4 100644
--- a/src/bootstrap/native.rs
+++ b/src/bootstrap/native.rs
@@ -27,7 +27,7 @@ use std::process::Command;
 
 use build_helper::output;
 use cmake;
-use gcc;
+use cc;
 
 use Build;
 use util;
@@ -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::Build::new();
+        let mut cfg = cc::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
diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
index 19879ab2ade..a05e58e6a22 100644
--- a/src/bootstrap/tool.rs
+++ b/src/bootstrap/tool.rs
@@ -126,6 +126,10 @@ pub fn prepare_tool_cargo(
         cargo.env("LIBZ_SYS_STATIC", "1");
     }
 
+    // if tools are using lzma we want to force the build script to build its
+    // own copy
+    cargo.env("LZMA_API_STATIC", "1");
+
     cargo.env("CFG_RELEASE_CHANNEL", &build.config.channel);
     cargo.env("CFG_VERSION", build.rust_version());
 
diff --git a/src/liballoc_jemalloc/Cargo.toml b/src/liballoc_jemalloc/Cargo.toml
index 94700cf4475..4042c4d2d4e 100644
--- a/src/liballoc_jemalloc/Cargo.toml
+++ b/src/liballoc_jemalloc/Cargo.toml
@@ -19,7 +19,7 @@ libc = { path = "../rustc/libc_shim" }
 
 [build-dependencies]
 build_helper = { path = "../build_helper" }
-gcc = "0.3.50"
+cc = "1.0"
 
 [features]
 debug = []
diff --git a/src/liballoc_jemalloc/build.rs b/src/liballoc_jemalloc/build.rs
index d89d3bcdb62..7dd85ddcc79 100644
--- a/src/liballoc_jemalloc/build.rs
+++ b/src/liballoc_jemalloc/build.rs
@@ -11,7 +11,7 @@
 #![deny(warnings)]
 
 extern crate build_helper;
-extern crate gcc;
+extern crate cc;
 
 use std::env;
 use std::path::PathBuf;
@@ -63,7 +63,7 @@ fn main() {
         _ => return,
     };
 
-    let compiler = gcc::Build::new().get_compiler();
+    let compiler = cc::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::Build::new()
+        cc::Build::new()
             .flag("-fvisibility=hidden")
             .file("pthread_atfork_dummy.c")
             .compile("libpthread_atfork_dummy.a");
diff --git a/src/libprofiler_builtins/Cargo.toml b/src/libprofiler_builtins/Cargo.toml
index a60db313679..eb31f5730d1 100644
--- a/src/libprofiler_builtins/Cargo.toml
+++ b/src/libprofiler_builtins/Cargo.toml
@@ -15,4 +15,4 @@ doc = false
 core = { path = "../libcore" }
 
 [build-dependencies]
-gcc = "0.3.50"
+cc = "1.0"
diff --git a/src/libprofiler_builtins/build.rs b/src/libprofiler_builtins/build.rs
index 41e92b33475..8508b2dae2c 100644
--- a/src/libprofiler_builtins/build.rs
+++ b/src/libprofiler_builtins/build.rs
@@ -12,14 +12,14 @@
 //!
 //! See the build.rs for libcompiler_builtins crate for details.
 
-extern crate gcc;
+extern crate cc;
 
 use std::env;
 use std::path::Path;
 
 fn main() {
     let target = env::var("TARGET").expect("TARGET was not set");
-    let cfg = &mut gcc::Build::new();
+    let cfg = &mut cc::Build::new();
 
     let mut profile_sources = vec!["GCDAProfiling.c",
                                    "InstrProfiling.c",
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs
index d3256357941..b1bf893cfd8 100644
--- a/src/librustc/session/config.rs
+++ b/src/librustc/session/config.rs
@@ -1373,20 +1373,20 @@ pub fn rustc_optgroups() -> Vec<RustcOptGroup> {
                                  always = always colorize output;
                                  never  = never colorize output", "auto|always|never"),
 
-        opt::flagopt("", "pretty",
-                     "Pretty-print the input instead of compiling;
-                      valid types are: `normal` (un-annotated source),
-                      `expanded` (crates expanded), or
-                      `expanded,identified` (fully parenthesized, AST nodes with IDs).",
-                     "TYPE"),
-        opt::flagopt("", "unpretty",
-                     "Present the input source, unstable (and less-pretty) variants;
-                      valid types are any of the types for `--pretty`, as well as:
-                      `flowgraph=<nodeid>` (graphviz formatted flowgraph for node),
-                      `everybody_loops` (all function bodies replaced with `loop {}`),
-                      `hir` (the HIR), `hir,identified`, or
-                      `hir,typed` (HIR with types for each node).",
-                     "TYPE"),
+        opt::opt("", "pretty",
+                 "Pretty-print the input instead of compiling;
+                  valid types are: `normal` (un-annotated source),
+                  `expanded` (crates expanded), or
+                  `expanded,identified` (fully parenthesized, AST nodes with IDs).",
+                 "TYPE"),
+        opt::opt("", "unpretty",
+                 "Present the input source, unstable (and less-pretty) variants;
+                  valid types are any of the types for `--pretty`, as well as:
+                  `flowgraph=<nodeid>` (graphviz formatted flowgraph for node),
+                  `everybody_loops` (all function bodies replaced with `loop {}`),
+                  `hir` (the HIR), `hir,identified`, or
+                  `hir,typed` (HIR with types for each node).",
+                 "TYPE"),
     ]);
     opts
 }
diff --git a/src/librustc_llvm/Cargo.toml b/src/librustc_llvm/Cargo.toml
index 1ed2cbab65f..de5add56b76 100644
--- a/src/librustc_llvm/Cargo.toml
+++ b/src/librustc_llvm/Cargo.toml
@@ -18,4 +18,4 @@ rustc_cratesio_shim = { path = "../librustc_cratesio_shim" }
 
 [build-dependencies]
 build_helper = { path = "../build_helper" }
-gcc = "0.3.50"
+cc = "1.0"
diff --git a/src/librustc_llvm/build.rs b/src/librustc_llvm/build.rs
index 393aa7fa43b..dde7a38efc7 100644
--- a/src/librustc_llvm/build.rs
+++ b/src/librustc_llvm/build.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-extern crate gcc;
+extern crate cc;
 extern crate build_helper;
 
 use std::process::Command;
@@ -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::Build::new();
+    let mut cfg = cc::Build::new();
     cfg.warnings(false);
     for flag in cxxflags.split_whitespace() {
         // Ignore flags like `-m64` when we're doing a cross build
diff --git a/src/librustc_trans/Cargo.toml b/src/librustc_trans/Cargo.toml
index 6f1f5b4a123..482350d04b5 100644
--- a/src/librustc_trans/Cargo.toml
+++ b/src/librustc_trans/Cargo.toml
@@ -32,4 +32,4 @@ syntax = { path = "../libsyntax" }
 syntax_pos = { path = "../libsyntax_pos" }
 
 [target."cfg(windows)".dependencies]
-gcc = "0.3.50"
+cc = "1.0"
diff --git a/src/librustc_trans/back/link.rs b/src/librustc_trans/back/link.rs
index 1630e775991..39a9ccd8eb9 100644
--- a/src/librustc_trans/back/link.rs
+++ b/src/librustc_trans/back/link.rs
@@ -125,7 +125,7 @@ pub fn get_linker(sess: &Session) -> (String, Command, Vec<(OsString, OsString)>
 
 #[cfg(windows)]
 pub fn msvc_link_exe_cmd(sess: &Session) -> (Command, Vec<(OsString, OsString)>) {
-    use gcc::windows_registry;
+    use cc::windows_registry;
 
     let target = &sess.opts.target_triple;
     let tool = windows_registry::find_tool(target, "link.exe");
diff --git a/src/librustc_trans/lib.rs b/src/librustc_trans/lib.rs
index 8a2c478cea0..796dfd4417c 100644
--- a/src/librustc_trans/lib.rs
+++ b/src/librustc_trans/lib.rs
@@ -61,7 +61,7 @@ extern crate syntax_pos;
 extern crate rustc_errors as errors;
 extern crate serialize;
 #[cfg(windows)]
-extern crate gcc; // Used to locate MSVC, not gcc :)
+extern crate cc; // Used to locate MSVC
 
 pub use base::trans_crate;
 
diff --git a/src/librustdoc/Cargo.toml b/src/librustdoc/Cargo.toml
index 61ac541e2c1..b295b414a03 100644
--- a/src/librustdoc/Cargo.toml
+++ b/src/librustdoc/Cargo.toml
@@ -18,4 +18,4 @@ html-diff = "0.0.4"
 
 [build-dependencies]
 build_helper = { path = "../build_helper" }
-gcc = "0.3.50"
+cc = "1.0"
diff --git a/src/librustdoc/build.rs b/src/librustdoc/build.rs
index 830492dec94..97c9ca1e2d2 100644
--- a/src/librustdoc/build.rs
+++ b/src/librustdoc/build.rs
@@ -9,12 +9,12 @@
 // except according to those terms.
 
 extern crate build_helper;
-extern crate gcc;
+extern crate cc;
 
 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::Build::new();
+    let mut cfg = cc::Build::new();
     cfg.file("../rt/hoedown/src/autolink.c")
        .file("../rt/hoedown/src/buffer.c")
        .file("../rt/hoedown/src/document.c")
diff --git a/src/libstd/Cargo.toml b/src/libstd/Cargo.toml
index 09c16816934..fb276448ffa 100644
--- a/src/libstd/Cargo.toml
+++ b/src/libstd/Cargo.toml
@@ -36,7 +36,7 @@ rustc_tsan = { path = "../librustc_tsan" }
 
 [build-dependencies]
 build_helper = { path = "../build_helper" }
-gcc = "0.3.50"
+cc = "1.0"
 
 [features]
 backtrace = []
diff --git a/src/libstd/build.rs b/src/libstd/build.rs
index b8061665aa1..7ca762c801a 100644
--- a/src/libstd/build.rs
+++ b/src/libstd/build.rs
@@ -11,7 +11,7 @@
 #![deny(warnings)]
 
 extern crate build_helper;
-extern crate gcc;
+extern crate cc;
 
 use std::env;
 use std::process::Command;
@@ -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::Build::new().get_compiler();
+    let compiler = cc::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())