Make libtool wrapper handle ar args#601
Conversation
When interoping with other build systems, like through rules_rust or rules_foreign_cc, they often expect the `AR` env var to be set to the literal `ar` command line tool. Apple currently ships an `ar` from the `cctools` repo that doesn't have the same hermeticity flags as `llvm-ar` (specifically it is lacking `D`). Because of this we use `libtool` which supports `-D`. This change allows callers to not care about that difference and pretend our wrapper is `ar`, and we still correctly create archives with libtool.
|
it's possible that we could just use
|
|
the other question here is do we rename this wrapper. currently rules_rust uses the fact that it's named |
|
based on my testing, since xcode 26.4 |
|
i think we have to rename the binary, too many places checking that name, and there can still be toolchains that actually use libtool and so that logic can't be removed from the rules |
When interoping with other build systems, like through rules_rust or
rules_foreign_cc, they often expect the
ARenv var to be set to theliteral
arcommand line tool. Apple currently ships anarfrom thecctoolsrepo that doesn't have the same hermeticity flags asllvm-ar(specifically it is lacking
D). Because of this we uselibtoolwhichsupports
-D. This change allows callers to not care about thatdifference and pretend our wrapper is
ar, and we still correctlycreate archives with libtool.