Skip to content

Commit

Permalink
Use GNU AR for illumos (#585)
Browse files Browse the repository at this point in the history
  • Loading branch information
smklein authored Feb 23, 2021
1 parent 3283434 commit 3f0aa40
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2342,6 +2342,12 @@ impl Build {
Some(t) => return Ok((t, "lib.exe".to_string())),
None => "lib.exe".to_string(),
}
} else if target.contains("illumos") {
// The default 'ar' on illumos uses a non-standard flags,
// but the OS comes bundled with a GNU-compatible variant.
//
// Use the GNU-variant to match other Unix systems.
"gar".to_string()
} else if self.get_host()? != target {
match self.prefix_for_target(&target) {
Some(p) => {
Expand Down

0 comments on commit 3f0aa40

Please sign in to comment.