Fix stripping on Darwin
The strip tool is different on Darwin, use a separate darwinStrip rule
instead of calling strip.sh for host builds on Darwin.
Change-Id: I6d421cba0dcea04367d5bc638a03f64c81e2ead0
diff --git a/cc/cc.go b/cc/cc.go
index 052df2b..1a8ba3b 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -1979,10 +1979,14 @@
func (stripper *stripper) strip(ctx ModuleContext, in, out common.ModuleOutPath,
flags builderFlags) {
- flags.stripKeepSymbols = stripper.StripProperties.Strip.Keep_symbols
- // TODO(ccross): don't add gnu debuglink for user builds
- flags.stripAddGnuDebuglink = true
- TransformStrip(ctx, in, out, flags)
+ if ctx.Darwin() {
+ TransformDarwinStrip(ctx, in, out)
+ } else {
+ flags.stripKeepSymbols = stripper.StripProperties.Strip.Keep_symbols
+ // TODO(ccross): don't add gnu debuglink for user builds
+ flags.stripAddGnuDebuglink = true
+ TransformStrip(ctx, in, out, flags)
+ }
}
func testPerSrcMutator(mctx common.AndroidBottomUpMutatorContext) {