summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2023-11-17 01:04:08 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2023-11-17 01:04:08 +0000
commit404fd1cce8c35ef13623283e99c229bd2859442c (patch)
treec71f14f52b5c205c623e6db8ca9f2249d422f52c
parent877a79fe28cc725aeb53004d4930c1bd2af4b10a (diff)
parent72a8cee8fe4f577dd73e59a05441055ededb0255 (diff)
Merge "Modify conditionals for BuildFromTextStub()" into main am: 72a8cee8fe
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2832580 Change-Id: I19219038d92e1aa018c7c4ed9a8583b714c55b85 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--android/config.go8
-rw-r--r--android/variable.go2
2 files changed, 9 insertions, 1 deletions
diff --git a/android/config.go b/android/config.go
index 572e006a1..f00e79958 100644
--- a/android/config.go
+++ b/android/config.go
@@ -2075,11 +2075,17 @@ func (c *config) JavaCoverageEnabled() bool {
return c.IsEnvTrue("EMMA_INSTRUMENT") || c.IsEnvTrue("EMMA_INSTRUMENT_STATIC") || c.IsEnvTrue("EMMA_INSTRUMENT_FRAMEWORK")
}
+func (c *deviceConfig) BuildFromSourceStub() bool {
+ return Bool(c.config.productVariables.BuildFromSourceStub)
+}
+
func (c *config) BuildFromTextStub() bool {
// TODO: b/302320354 - Remove the coverage build specific logic once the
// robust solution for handling native properties in from-text stub build
// is implemented.
- return !c.buildFromSourceStub && !c.JavaCoverageEnabled() && !c.IsEnvTrue("BUILD_FROM_SOURCE_STUB")
+ return !c.buildFromSourceStub &&
+ !c.JavaCoverageEnabled() &&
+ !c.deviceConfig.BuildFromSourceStub()
}
func (c *config) SetBuildFromTextStub(b bool) {
diff --git a/android/variable.go b/android/variable.go
index 648e4cf18..fe3a6d790 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -494,6 +494,8 @@ type ProductVariables struct {
Release_expose_flagged_api *bool `json:",omitempty"`
BuildFlags map[string]string `json:",omitempty"`
+
+ BuildFromSourceStub *bool `json:",omitempty"`
}
type PartitionQualifiedVariablesType struct {