Add brillo cflags

Add __BRILLO__ to global cflags when building for a brillo product.

Bug: 26165350
Change-Id: I0100a8821b763075d1873d0d48fd5bd217afb580
This commit is contained in:
Colin Cross
2015-12-15 16:07:43 -08:00
parent 5ba07e8fe4
commit 7b66f15763
2 changed files with 5 additions and 0 deletions

View File

@@ -581,6 +581,10 @@ func (c *CCBase) collectFlags(ctx common.AndroidModuleContext, toolchain Toolcha
fmt.Sprintf("${%sGlobalCflags}", ctx.HostOrDevice())) fmt.Sprintf("${%sGlobalCflags}", ctx.HostOrDevice()))
} }
if Bool(ctx.AConfig().ProductVariables.Brillo) {
flags.GlobalFlags = append(flags.GlobalFlags, "-D__BRILLO__")
}
if ctx.Device() { if ctx.Device() {
if Bool(c.Properties.Rtti) { if Bool(c.Properties.Rtti) {
flags.CppFlags = append(flags.CppFlags, "-frtti") flags.CppFlags = append(flags.CppFlags, "-frtti")

View File

@@ -82,6 +82,7 @@ type productVariables struct {
CrossHostSecondaryArch *string `json:",omitempty"` CrossHostSecondaryArch *string `json:",omitempty"`
Unbundled_build *bool `json:",omitempty"` Unbundled_build *bool `json:",omitempty"`
Brillo *bool `json:",omitempty"`
} }
func boolPtr(v bool) *bool { func boolPtr(v bool) *bool {