diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-03-28 23:00:47 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-03-28 23:00:47 +0000 |
commit | cef786fa78457bc0907650cc791d8f9fd1980504 (patch) | |
tree | 48c92e78197ffeb8426226c669b58c82b3c33d99 | |
parent | e811bec991b3c2490a0da52c9c3229339c858899 (diff) | |
parent | 82747779baa334116d0337fb13edd1c0fdca5324 (diff) | |
download | soong-android13-qpr3-s4-release.tar.gz |
Snap for 9839085 from 82747779baa334116d0337fb13edd1c0fdca5324 to tm-qpr3-releaseandroid-13.0.0_r83android-13.0.0_r79android-13.0.0_r78android-13.0.0_r77android-13.0.0_r76android-13.0.0_r75android-13.0.0_r71android-13.0.0_r70android-13.0.0_r69android-13.0.0_r68android-13.0.0_r67android-13.0.0_r63android-13.0.0_r62android-13.0.0_r61android-13.0.0_r56android-13.0.0_r54android-13.0.0_r53android-13.0.0_r52android-13.0.0_r51android-13.0.0_r50android13-qpr3-s9-releaseandroid13-qpr3-s8-releaseandroid13-qpr3-s7-releaseandroid13-qpr3-s6-releaseandroid13-qpr3-s5-releaseandroid13-qpr3-s4-releaseandroid13-qpr3-s3-releaseandroid13-qpr3-s2-releaseandroid13-qpr3-s14-releaseandroid13-qpr3-s13-releaseandroid13-qpr3-s12-releaseandroid13-qpr3-s11-releaseandroid13-qpr3-s10-releaseandroid13-qpr3-s1-releaseandroid13-qpr3-release
Change-Id: I9b63cedbb3bbe6867ee700420d2d698c2f657d20
-rw-r--r-- | android/config.go | 4 | ||||
-rw-r--r-- | android/register.go | 1 | ||||
-rw-r--r-- | android/variable.go | 2 | ||||
-rw-r--r-- | cmd/soong_build/main.go | 1 | ||||
-rw-r--r-- | ui/build/config.go | 10 | ||||
-rw-r--r-- | ui/build/dumpvars.go | 2 | ||||
-rw-r--r-- | ui/build/soong.go | 1 |
7 files changed, 21 insertions, 0 deletions
diff --git a/android/config.go b/android/config.go index 3c99659f9..cbf186e46 100644 --- a/android/config.go +++ b/android/config.go @@ -1093,6 +1093,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) } diff --git a/android/register.go b/android/register.go index c50583322..a29cfeaf1 100644 --- a/android/register.go +++ b/android/register.go @@ -160,6 +160,7 @@ type Context struct { func NewContext(config Config) *Context { ctx := &Context{blueprint.NewContext(), config} ctx.SetSrcDir(absSrcDir) + ctx.AddIncludeTags(config.IncludeTags()...) return ctx } diff --git a/android/variable.go b/android/variable.go index 442068423..8d96e31cb 100644 --- a/android/variable.go +++ b/android/variable.go @@ -445,6 +445,8 @@ type productVariables struct { GenerateAidlNdkPlatformBackend bool `json:",omitempty"` ForceMultilibFirstOnDevice bool `json:",omitempty"` + + IncludeTags []string `json:",omitempty"` } func boolPtr(v bool) *bool { diff --git a/cmd/soong_build/main.go b/cmd/soong_build/main.go index 4b3161b33..f1884a795 100644 --- a/cmd/soong_build/main.go +++ b/cmd/soong_build/main.go @@ -117,6 +117,7 @@ func newContext(configuration android.Config) *android.Context { ctx.Register() ctx.SetNameInterface(newNameResolver(configuration)) ctx.SetAllowMissingDependencies(configuration.AllowMissingDependencies()) + ctx.AddIncludeTags(configuration.IncludeTags()...) return ctx } diff --git a/ui/build/config.go b/ui/build/config.go index e271bfca2..a6763214f 100644 --- a/ui/build/config.go +++ b/ui/build/config.go @@ -98,6 +98,8 @@ type configImpl struct { emptyNinjaFile bool metricsUploader string + + includeTags []string } const srcDirFileCheck = "build/soong/root.bp" @@ -1038,6 +1040,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 diff --git a/ui/build/dumpvars.go b/ui/build/dumpvars.go index 285f1569b..cc796ce3f 100644 --- a/ui/build/dumpvars.go +++ b/ui/build/dumpvars.go @@ -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_TYPE", @@ -295,4 +296,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"])) } diff --git a/ui/build/soong.go b/ui/build/soong.go index c7f22f946..a0ab1cc10 100644 --- a/ui/build/soong.go +++ b/ui/build/soong.go @@ -332,6 +332,7 @@ func bootstrapBlueprint(ctx Context, config Config) { blueprintArgs.EmptyNinjaFile = false blueprintCtx := blueprint.NewContext() + blueprintCtx.AddIncludeTags(config.GetIncludeTags()...) blueprintCtx.SetIgnoreUnknownModuleTypes(true) blueprintConfig := BlueprintConfig{ soongOutDir: config.SoongOutDir(), |