Create a new product variable to gate blueprint files am: c576383336
am: ff5b89e55d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2297118 Change-Id: I2da17a8f4c06a4b1bd3b1a124006ecaa1fb53b20 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
bd7850f20e
7 changed files with 21 additions and 0 deletions
|
@ -1111,6 +1111,10 @@ func (c *config) ExportedNamespaces() []string {
|
|||
return append([]string(nil), c.productVariables.NamespacesToExport...)
|
||||
}
|
||||
|
||||
func (c *config) IncludeTags() []string {
|
||||
return c.productVariables.IncludeTags
|
||||
}
|
||||
|
||||
func (c *config) HostStaticBinaries() bool {
|
||||
return Bool(c.productVariables.HostStaticBinaries)
|
||||
}
|
||||
|
|
|
@ -161,6 +161,7 @@ type Context struct {
|
|||
func NewContext(config Config) *Context {
|
||||
ctx := &Context{blueprint.NewContext(), config}
|
||||
ctx.SetSrcDir(absSrcDir)
|
||||
ctx.AddIncludeTags(config.IncludeTags()...)
|
||||
return ctx
|
||||
}
|
||||
|
||||
|
|
|
@ -452,6 +452,8 @@ type productVariables struct {
|
|||
GenerateAidlNdkPlatformBackend bool `json:",omitempty"`
|
||||
|
||||
IgnorePrefer32OnDevice bool `json:",omitempty"`
|
||||
|
||||
IncludeTags []string `json:",omitempty"`
|
||||
}
|
||||
|
||||
func boolPtr(v bool) *bool {
|
||||
|
|
|
@ -114,6 +114,7 @@ func newContext(configuration android.Config) *android.Context {
|
|||
ctx := android.NewContext(configuration)
|
||||
ctx.SetNameInterface(newNameResolver(configuration))
|
||||
ctx.SetAllowMissingDependencies(configuration.AllowMissingDependencies())
|
||||
ctx.AddIncludeTags(configuration.IncludeTags()...)
|
||||
return ctx
|
||||
}
|
||||
|
||||
|
|
|
@ -111,6 +111,8 @@ type configImpl struct {
|
|||
metricsUploader string
|
||||
|
||||
bazelForceEnabledModules string
|
||||
|
||||
includeTags []string
|
||||
}
|
||||
|
||||
const srcDirFileCheck = "build/soong/root.bp"
|
||||
|
@ -1079,6 +1081,14 @@ func (c *configImpl) Parallel() int {
|
|||
return c.parallel
|
||||
}
|
||||
|
||||
func (c *configImpl) GetIncludeTags() []string {
|
||||
return c.includeTags
|
||||
}
|
||||
|
||||
func (c *configImpl) SetIncludeTags(i []string) {
|
||||
c.includeTags = i
|
||||
}
|
||||
|
||||
func (c *configImpl) HighmemParallel() int {
|
||||
if i, ok := c.environ.GetInt("NINJA_HIGHMEM_NUM_JOBS"); ok {
|
||||
return i
|
||||
|
|
|
@ -139,6 +139,7 @@ func dumpMakeVars(ctx Context, config Config, goals, vars []string, write_soong_
|
|||
var BannerVars = []string{
|
||||
"PLATFORM_VERSION_CODENAME",
|
||||
"PLATFORM_VERSION",
|
||||
"PRODUCT_INCLUDE_TAGS",
|
||||
"TARGET_PRODUCT",
|
||||
"TARGET_BUILD_VARIANT",
|
||||
"TARGET_BUILD_APPS",
|
||||
|
@ -289,4 +290,5 @@ func runMakeProductConfig(ctx Context, config Config) {
|
|||
config.SetBuildBrokenDupRules(makeVars["BUILD_BROKEN_DUP_RULES"] == "true")
|
||||
config.SetBuildBrokenUsesNetwork(makeVars["BUILD_BROKEN_USES_NETWORK"] == "true")
|
||||
config.SetBuildBrokenNinjaUsesEnvVars(strings.Fields(makeVars["BUILD_BROKEN_NINJA_USES_ENV_VARS"]))
|
||||
config.SetIncludeTags(strings.Fields(makeVars["PRODUCT_INCLUDE_TAGS"]))
|
||||
}
|
||||
|
|
|
@ -403,6 +403,7 @@ func bootstrapBlueprint(ctx Context, config Config) {
|
|||
}
|
||||
|
||||
blueprintCtx := blueprint.NewContext()
|
||||
blueprintCtx.AddIncludeTags(config.GetIncludeTags()...)
|
||||
blueprintCtx.SetIgnoreUnknownModuleTypes(true)
|
||||
blueprintConfig := BlueprintConfig{
|
||||
soongOutDir: config.SoongOutDir(),
|
||||
|
|
Loading…
Reference in a new issue