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
This commit is contained in:
Colin Cross
2015-03-26 15:12:10 -07:00
parent f8209413f1
commit 4ae185c7ec

View File

@@ -1165,6 +1165,9 @@ type CCBinary struct {
// 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) buildShared() bool {
}
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 {