From f13642ef247b1f86f2b28adb4dc14e1f85156633 Mon Sep 17 00:00:00 2001 From: Felka Chang Date: Fri, 21 Jun 2019 20:58:27 +0800 Subject: [PATCH] Add product_variables.eng.optimize.enabled The default build is to enable optimization for all of module. In order to have the feasibility to the owners of the modules, to create product_variables.eng.optimize.enabled let the owners to have the choice to decide whether the build enable the optimization or not. Test: atest -m # build soong Test: # follow Developing for Soong & setup GOPATH # to run the new tests in variables_test.go cd $GOPATH; \ go test android/soong/android Test: #1. change frameworks/base/packages/SystemUI/Android.bp to change product_variables.eng.optimize.enabled = false; #2. source build/setupenv.sh; #3. lunch aosp_x86-eng; make -j16 SystemUI #4. lunch aosp_x86-userdebug; make -j16 SystemUI #5. aosp_x86-eng should be bigger than aosp_x86-userdebug Bug: 130259652 Change-Id: Ie62c35458ca91d66ec65bda58d315fb971139849 --- android/variable.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/android/variable.go b/android/variable.go index 8357d2fff..612d138c3 100644 --- a/android/variable.go +++ b/android/variable.go @@ -95,6 +95,9 @@ type variableProperties struct { Sanitize struct { Address *bool } + Optimize struct { + Enabled *bool + } } Pdk struct {