Use target that Cargo sets for c driver compilation

pull/5/head
Thijs Cadier 9 years ago
parent 8d6c348401
commit 885c26f133

@ -55,9 +55,9 @@ fn main() {
command.env("BSON_CFLAGS", "-fPIC"); command.env("BSON_CFLAGS", "-fPIC");
command.current_dir(&driver_path); command.current_dir(&driver_path);
// Use env var to override build target if set // Use target that Cargo sets
if let Ok(host) = env::var("MONGO_C_DRIVER_HOST") { if let Ok(target) = env::var("TARGET") {
command.arg(format!("--host={}", host)); command.arg(format!("--host={}", target));
} }
assert!(command.status().unwrap().success()); assert!(command.status().unwrap().success());

Loading…
Cancel
Save