diff options
Diffstat (limited to 'src/build_helper/lib.rs')
| -rw-r--r-- | src/build_helper/lib.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/build_helper/lib.rs b/src/build_helper/lib.rs index 07f9c91d3c7..d0d588f46a7 100644 --- a/src/build_helper/lib.rs +++ b/src/build_helper/lib.rs @@ -47,6 +47,8 @@ pub fn cc2ar(cc: &Path, target: &str) -> Option<PathBuf> { None } else if target.contains("musl") { Some(PathBuf::from("ar")) + } else if target.contains("openbsd") { + Some(PathBuf::from("ar")) } else { let parent = cc.parent().unwrap(); let file = cc.file_name().unwrap().to_str().unwrap(); @@ -61,6 +63,16 @@ pub fn cc2ar(cc: &Path, target: &str) -> Option<PathBuf> { } } +pub fn make(host: &str) -> PathBuf { + if host.contains("bitrig") || host.contains("dragonfly") || + host.contains("freebsd") || host.contains("netbsd") || + host.contains("openbsd") { + PathBuf::from("gmake") + } else { + PathBuf::from("make") + } +} + pub fn output(cmd: &mut Command) -> String { let output = match cmd.stderr(Stdio::inherit()).output() { Ok(status) => status, |
