Skip to content

Commit 2f65a3f

Browse files
committed
Auto merge of #295 - posborne:build-script-cleanup, r=kamalmarhubi
test: clean up the test build script Signed-off-by: Paul Osborne <[email protected]>
2 parents 2a322a3 + b8f0535 commit 2f65a3f

File tree

1 file changed

+5
-42
lines changed

1 file changed

+5
-42
lines changed

nix-test/build.rs

Lines changed: 5 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -13,46 +13,9 @@ pub fn main() {
1313
"UNKNOWN"
1414
};
1515

16-
let mut config = gcc::Config::new();
17-
18-
for file in &["src/const.c", "src/sizes.c"] {
19-
config.file(file);
20-
}
21-
22-
config.define(os, None);
23-
24-
config.compile("libnixtest.a");
25-
}
26-
27-
/*
28-
use std::env;
29-
use std::process::Command;
30-
31-
pub fn main() {
32-
let root = env::var("CARGO_MANIFEST_DIR").unwrap();
33-
let make = root.clone() + "/Makefile";
34-
let src = root.clone() + "/src";
35-
let out = env::var("OUT_DIR").unwrap();
36-
let target = env::var("TARGET").unwrap();
37-
38-
let os = if target.contains("linux") {
39-
"LINUX"
40-
} else if target.contains("darwin") {
41-
"DARWIN"
42-
} else {
43-
"UNKNOWN"
44-
};
45-
46-
let res = Command::new("make")
47-
.arg("-f").arg(&make)
48-
.current_dir(&out)
49-
.env("VPATH", &src)
50-
.env("OS", os)
51-
.spawn().unwrap()
52-
.wait().unwrap();
53-
54-
assert!(res.success());
55-
56-
println!("cargo:rustc-flags=-L {}/", out);
16+
gcc::Config::new()
17+
.file("src/const.c")
18+
.file("src/sizes.c")
19+
.define(os, None)
20+
.compile("libnixtest.a");
5721
}
58-
*/

0 commit comments

Comments
 (0)