Merge "Revert^2 "Modify conditionals for BuildFromTextStub()"" into main am: d8dd46e5be
am: 99b1e8133d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2835958 Change-Id: Ifbf440a425ec98de96bab6529f5effef0582d81a Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -570,8 +570,6 @@ func NewConfig(cmdArgs CmdArgs, availableEnv map[string]string) (Config, error)
|
|||||||
config: config,
|
config: config,
|
||||||
}
|
}
|
||||||
|
|
||||||
config.productVariables.Build_from_text_stub = boolPtr(config.BuildFromTextStub())
|
|
||||||
|
|
||||||
// Soundness check of the build and source directories. This won't catch strange
|
// Soundness check of the build and source directories. This won't catch strange
|
||||||
// configurations with symlinks, but at least checks the obvious case.
|
// configurations with symlinks, but at least checks the obvious case.
|
||||||
absBuildDir, err := filepath.Abs(cmdArgs.SoongOutDir)
|
absBuildDir, err := filepath.Abs(cmdArgs.SoongOutDir)
|
||||||
@@ -707,6 +705,8 @@ func NewConfig(cmdArgs CmdArgs, availableEnv map[string]string) (Config, error)
|
|||||||
"i18n.module.public.api": {},
|
"i18n.module.public.api": {},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
config.productVariables.Build_from_text_stub = boolPtr(config.BuildFromTextStub())
|
||||||
|
|
||||||
return Config{config}, err
|
return Config{config}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2075,11 +2075,17 @@ func (c *config) JavaCoverageEnabled() bool {
|
|||||||
return c.IsEnvTrue("EMMA_INSTRUMENT") || c.IsEnvTrue("EMMA_INSTRUMENT_STATIC") || c.IsEnvTrue("EMMA_INSTRUMENT_FRAMEWORK")
|
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 {
|
func (c *config) BuildFromTextStub() bool {
|
||||||
// TODO: b/302320354 - Remove the coverage build specific logic once the
|
// TODO: b/302320354 - Remove the coverage build specific logic once the
|
||||||
// robust solution for handling native properties in from-text stub build
|
// robust solution for handling native properties in from-text stub build
|
||||||
// is implemented.
|
// 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) {
|
func (c *config) SetBuildFromTextStub(b bool) {
|
||||||
|
@@ -494,6 +494,8 @@ type ProductVariables struct {
|
|||||||
Release_expose_flagged_api *bool `json:",omitempty"`
|
Release_expose_flagged_api *bool `json:",omitempty"`
|
||||||
|
|
||||||
BuildFlags map[string]string `json:",omitempty"`
|
BuildFlags map[string]string `json:",omitempty"`
|
||||||
|
|
||||||
|
BuildFromSourceStub *bool `json:",omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PartitionQualifiedVariablesType struct {
|
type PartitionQualifiedVariablesType struct {
|
||||||
|
Reference in New Issue
Block a user