Add brillo cflags
Add __BRILLO__ to global cflags when building for a brillo product.
Bug: 26165350
Change-Id: I0100a8821b763075d1873d0d48fd5bd217afb580
diff --git a/cc/cc.go b/cc/cc.go
index b497d66..6315cbf 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -581,6 +581,10 @@
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")