Add brillo cflags
Add __BRILLO__ to global cflags when building for a brillo product. Bug: 26165350 Change-Id: I0100a8821b763075d1873d0d48fd5bd217afb580
This commit is contained in:
4
cc/cc.go
4
cc/cc.go
@@ -581,6 +581,10 @@ func (c *CCBase) collectFlags(ctx common.AndroidModuleContext, toolchain Toolcha
|
||||
fmt.Sprintf("${%sGlobalCflags}", ctx.HostOrDevice()))
|
||||
}
|
||||
|
||||
if Bool(ctx.AConfig().ProductVariables.Brillo) {
|
||||
flags.GlobalFlags = append(flags.GlobalFlags, "-D__BRILLO__")
|
||||
}
|
||||
|
||||
if ctx.Device() {
|
||||
if Bool(c.Properties.Rtti) {
|
||||
flags.CppFlags = append(flags.CppFlags, "-frtti")
|
||||
|
@@ -82,6 +82,7 @@ type productVariables struct {
|
||||
CrossHostSecondaryArch *string `json:",omitempty"`
|
||||
|
||||
Unbundled_build *bool `json:",omitempty"`
|
||||
Brillo *bool `json:",omitempty"`
|
||||
}
|
||||
|
||||
func boolPtr(v bool) *bool {
|
||||
|
Reference in New Issue
Block a user