Support for suffix property on binaries
The suffix property will modify the name of the resulting binary
by adding its value to the module name.
Change-Id: I188e97d4c88f26c060ba2ffbd37f832d701fe0cb
diff --git a/cc/cc.go b/cc/cc.go
index 8217030..3dba93b 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -1165,6 +1165,9 @@
// stem: set the name of the output
Stem string `android:"arch_variant"`
+ // suffix: append to the name of the output
+ Suffix string `android:"arch_variant"`
+
// prefix_symbols: if set, add an extra objcopy --prefix-symbols= step
Prefix_symbols string
}
@@ -1179,10 +1182,12 @@
}
func (c *CCBinary) getStem(ctx common.AndroidModuleContext) string {
+ stem := ctx.ModuleName()
if c.BinaryProperties.Stem != "" {
- return c.BinaryProperties.Stem
+ stem = c.BinaryProperties.Stem
}
- return ctx.ModuleName()
+
+ return stem + c.BinaryProperties.Suffix
}
func (c *CCBinary) DepNames(ctx common.AndroidBaseContext, depNames CCDeps) CCDeps {