From 4ae185c7ecf40ac0da03b884d9f6c0a19d53a332 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Thu, 26 Mar 2015 15:12:10 -0700 Subject: [PATCH] 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 --- cc/cc.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cc/cc.go b/cc/cc.go index 8217030a8..3dba93bd7 100644 --- a/cc/cc.go +++ b/cc/cc.go @@ -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 {