summary refs log tree commit diff
path: root/src/build_helper
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-01-19 11:13:42 -0800
committerGitHub <noreply@github.com>2017-01-19 11:13:42 -0800
commit10893a9a349cdd423f2490a6984acb5b3b7c8046 (patch)
tree106134ecd115ef74c6d4994e50fb34e60eed083c /src/build_helper
parentad78c04a9a0abd5b2332b5046060f16edef2b05b (diff)
parent5466c1bc80ad7cf08d71e77e7af3d17a24b50f36 (diff)
downloadrust-1.15.0.tar.gz
rust-1.15.0.zip
Merge pull request #39189 from brson/beta-next 1.15.0
Beta next
Diffstat (limited to 'src/build_helper')
-rw-r--r--src/build_helper/lib.rs12
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,