Use xcrun and xcode-select to auto-configure mac sdk
This roughly matches what make uses, but with less string parsing.
Also use a full path to "ar", so that we can depend on it.
Change-Id: I5e9d4c06b6cbbbfbf93e563dace128943db21b02
diff --git a/cc/builder.go b/cc/builder.go
index f5fc9ee..98f66d9 100644
--- a/cc/builder.go
+++ b/cc/builder.go
@@ -227,7 +227,7 @@
func TransformDarwinObjToStaticLib(ctx common.AndroidModuleContext, objFiles common.Paths,
flags builderFlags, outputPath common.ModuleOutPath) {
- arCmd := "ar"
+ arCmd := "${macArPath}"
arFlags := "cqs"
// ARG_MAX on darwin is 262144, use half that to be safe