From fcebcd5c373fe10c3c741047c5b664b4279c7e9e Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Thu, 22 Sep 2016 14:49:10 -0700 Subject: [PATCH] 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 --- android/variable.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/android/variable.go b/android/variable.go index b99e48557..29d6c7de1 100644 --- a/android/variable.go +++ b/android/variable.go @@ -62,6 +62,10 @@ type variableProperties struct { Binder32bit struct { Cflags []string } + + Debuggable struct { + Cflags []string + } } `android:"arch_variant"` } @@ -102,6 +106,7 @@ type productVariables struct { Schedboost *bool `json:",omitempty"` Binder32bit *bool `json:",omitempty"` UseGoma *bool `json:",omitempty"` + Debuggable *bool `json:",omitempty"` DevicePrefer32BitExecutables *bool `json:",omitempty"` HostPrefer32BitExecutables *bool `json:",omitempty"`