Add `debuggable` product variable with cflags
Allows changing cflags based on the build variant being `eng` or
`userdebug`. This is used by some modules to turn on asserts for these
builds, and used by adb to allow root on non-user builds.
Test: Use this flag in an Android.bp, check the ninja file.
Change-Id: I27a5081378e94920482b4a742d65c46065047573
diff --git a/android/variable.go b/android/variable.go
index b99e485..29d6c7d 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -62,6 +62,10 @@
Binder32bit struct {
Cflags []string
}
+
+ Debuggable struct {
+ Cflags []string
+ }
} `android:"arch_variant"`
}
@@ -102,6 +106,7 @@
Schedboost *bool `json:",omitempty"`
Binder32bit *bool `json:",omitempty"`
UseGoma *bool `json:",omitempty"`
+ Debuggable *bool `json:",omitempty"`
DevicePrefer32BitExecutables *bool `json:",omitempty"`
HostPrefer32BitExecutables *bool `json:",omitempty"`