diff options
| author | Dustin Speckhals <dustin1114@gmail.com> | 2017-10-24 19:37:15 -0400 |
|---|---|---|
| committer | Dustin Speckhals <dustin1114@gmail.com> | 2017-10-24 19:37:15 -0400 |
| commit | bca47e42b2c878eafb109c59cf0c8074043c1251 (patch) | |
| tree | 968a99f37f9099c4ed0b68b8020400322e94b667 /src/liballoc_jemalloc | |
| parent | 69ba6738eb6bf9b6d11ebb81af2599648eb0bc04 (diff) | |
| parent | c2799fc9a5c631a790744ceb9cd08259af338c0c (diff) | |
| download | rust-bca47e42b2c878eafb109c59cf0c8074043c1251.tar.gz rust-bca47e42b2c878eafb109c59cf0c8074043c1251.zip | |
Merge branch 'master' into update-rls-data-for-save-analysis
Diffstat (limited to 'src/liballoc_jemalloc')
| -rw-r--r-- | src/liballoc_jemalloc/Cargo.toml | 2 | ||||
| -rw-r--r-- | src/liballoc_jemalloc/build.rs | 15 |
2 files changed, 2 insertions, 15 deletions
diff --git a/src/liballoc_jemalloc/Cargo.toml b/src/liballoc_jemalloc/Cargo.toml index 4042c4d2d4e..6d7d83dd993 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" } -cc = "1.0" +cc = "1.0.1" [features] debug = [] diff --git a/src/liballoc_jemalloc/build.rs b/src/liballoc_jemalloc/build.rs index 7dd85ddcc79..65e035d4ffd 100644 --- a/src/liballoc_jemalloc/build.rs +++ b/src/liballoc_jemalloc/build.rs @@ -63,15 +63,6 @@ fn main() { _ => return, }; - 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() - .iter() - .map(|s| s.to_str().unwrap()) - .collect::<Vec<_>>() - .join(" "); - let mut cmd = Command::new("sh"); cmd.arg(native.src_dir.join("configure") .to_str() @@ -79,8 +70,6 @@ fn main() { .replace("C:\\", "/c/") .replace("\\", "/")) .current_dir(&native.out_dir) - .env("CC", compiler.path()) - .env("EXTRA_CFLAGS", cflags.clone()) // jemalloc generates Makefile deps using GCC's "-MM" flag. This means // that GCC will run the preprocessor, and only the preprocessor, over // jemalloc's source files. If we don't specify CPPFLAGS, then at least @@ -89,9 +78,7 @@ fn main() { // passed to GCC, and then GCC won't define the // "__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4" macro that jemalloc needs to // select an atomic operation implementation. - .env("CPPFLAGS", cflags.clone()) - .env("AR", &ar) - .env("RANLIB", format!("{} s", ar.display())); + .env("CPPFLAGS", env::var_os("CFLAGS").unwrap_or_default()); if target.contains("ios") { cmd.arg("--disable-tls"); |
