Add a file to trivially disable tool building or testing

This commit is contained in:
Oliver Schneider
2017-08-30 18:59:26 +02:00
committed by Oliver Schneider
parent f0b5402283
commit ab018c76e1
9 changed files with 205 additions and 45 deletions

View File

@@ -15,7 +15,7 @@ extern crate gcc;
use std::env;
use std::process::Command;
use build_helper::{run, native_lib_boilerplate};
use build_helper::{run, native_lib_boilerplate, BuildExpectation};
fn main() {
let target = env::var("TARGET").expect("TARGET was not set");
@@ -97,11 +97,14 @@ fn build_libbacktrace(host: &str, target: &str) -> Result<(), ()> {
.env("CC", compiler.path())
.env("AR", &ar)
.env("RANLIB", format!("{} s", ar.display()))
.env("CFLAGS", cflags));
.env("CFLAGS", cflags),
BuildExpectation::None);
run(Command::new(build_helper::make(host))
.current_dir(&native.out_dir)
.arg(format!("INCDIR={}", native.src_dir.display()))
.arg("-j").arg(env::var("NUM_JOBS").expect("NUM_JOBS was not set")));
.arg("-j").arg(env::var("NUM_JOBS").expect("NUM_JOBS was not set")),
BuildExpectation::None);
Ok(())
}