]> git.lizzy.rs Git - rust.git/commitdiff
Disconnect ar from cc on OpenBSD
authorSébastien Marie <semarie@users.noreply.github.com>
Sat, 17 Dec 2016 10:22:41 +0000 (11:22 +0100)
committerSébastien Marie <semarie@users.noreply.github.com>
Sat, 17 Dec 2016 13:48:27 +0000 (14:48 +0100)
OpenBSD usually use an alternative compiler (`egcc') from ports. But the
`ar' is unprefixed as it comes from base.

src/build_helper/lib.rs

index 07f9c91d3c787b17f17c23be5225d1016d7142b3..bd036fae689559e5523d5d2b4aadf4a6520b7498 100644 (file)
@@ -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();