diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2017-03-03 20:11:04 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2017-03-04 21:38:26 +0300 |
| commit | 428f063fcdc35e048ff79d059a8963334ba2281c (patch) | |
| tree | ef19c01e9179f6d455cc6c6a7b3a0cbf316f3119 /src/liballoc_jemalloc | |
| parent | c652a4fb566ac4bec1d62c66769dd055ad239df6 (diff) | |
| download | rust-428f063fcdc35e048ff79d059a8963334ba2281c.tar.gz rust-428f063fcdc35e048ff79d059a8963334ba2281c.zip | |
Automate timestamp creation and build skipping for native libraries
Add comments
Diffstat (limited to 'src/liballoc_jemalloc')
| -rw-r--r-- | src/liballoc_jemalloc/build.rs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/liballoc_jemalloc/build.rs b/src/liballoc_jemalloc/build.rs index cc1e74ccbbf..ae040a23906 100644 --- a/src/liballoc_jemalloc/build.rs +++ b/src/liballoc_jemalloc/build.rs @@ -10,12 +10,10 @@ #![deny(warnings)] -#[macro_use] extern crate build_helper; extern crate gcc; use std::env; -use std::fs::File; use std::path::PathBuf; use std::process::Command; use build_helper::{run, native_lib_boilerplate}; @@ -60,11 +58,10 @@ fn main() { } let link_name = if target.contains("windows") { "jemalloc" } else { "jemalloc_pic" }; - let native = native_lib_boilerplate("jemalloc", "jemalloc", link_name, - "rustbuild.timestamp", "lib"); - if native.skip_build { - return - } + let native = match native_lib_boilerplate("jemalloc", "jemalloc", link_name, "lib") { + Ok(native) => native, + _ => return, + }; let compiler = gcc::Config::new().get_compiler(); // only msvc returns None for ar so unwrap is okay @@ -175,6 +172,4 @@ fn main() { .file("pthread_atfork_dummy.c") .compile("libpthread_atfork_dummy.a"); } - - t!(File::create(&native.timestamp)); } |
