Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When building some crates that make use of
cc-rs
in their build scripts, I noticed thatcargo build
died when running on illumos targets.Specifically, I saw the following output:
When supplying the manual environment variable
AR=...
, I noticed this issue could be avoided. However, the defaultar
implementation on illumos (in/usr/bin/ar
) continued to be incompatible.This PR updates the default, meaning that
cargo build
should now "cleanly work" without additional environment variables, by utilizing the "GNU AR" binary bundled with illumos (at/usr/bin/gar
) instead of the illlumos-specific one.Tested this out by compiling ring for illumos - before this patch, it failed, raising the
ar
issue. After this patch, it builds successfully with no errors.