Skip to content

Commit 8eac360

Browse files
authored
Check command statuses in build.rs (#1778)
This PR fixes #1684 by checking the statuses of two commands in the build.rs file. Signed-off-by: Samuel Moelius <sam@moeli.us>
1 parent 6f9b624 commit 8eac360

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

build.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,18 @@ use std::process::Command;
55
fn main() {
66
#[cfg(feature = "llvm")]
77
{
8-
Command::new("make")
8+
let status = Command::new("make")
99
.args(["-C", "stdlib"])
10-
.output()
11-
.expect("Could not build stdlib");
10+
.status()
11+
.expect("could not execute make");
12+
assert!(status.success(), "building stdlib failed");
1213

1314
// compile our linker
1415
let cxxflags = Command::new("llvm-config")
1516
.args(["--cxxflags"])
1617
.output()
1718
.expect("could not execute llvm-config");
19+
assert!(cxxflags.status.success(), "llvm-config failed");
1820

1921
let cxxflags = String::from_utf8(cxxflags.stdout).unwrap();
2022

0 commit comments

Comments
 (0)