Merge "Install VNDK libraries into vendor or product lib with flag" into main am: 7d34640ac8

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2648170

Change-Id: Ic68b28774fae655d638bb6b8b99a018f93d929b6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2023-07-19 05:30:53 +00:00
committed by Automerger Merge Worker
3 changed files with 7 additions and 1 deletions

View File

@@ -1355,6 +1355,10 @@ func (c *config) BazelModulesForceEnabledByFlag() map[string]struct{} {
return c.bazelForceEnabledModules return c.bazelForceEnabledModules
} }
func (c *config) IsVndkDeprecated() bool {
return !Bool(c.productVariables.KeepVndk)
}
func (c *deviceConfig) Arches() []Arch { func (c *deviceConfig) Arches() []Arch {
var arches []Arch var arches []Arch
for _, target := range c.config.Targets[Android] { for _, target := range c.config.Targets[Android] {

View File

@@ -475,6 +475,8 @@ type ProductVariables struct {
ReleaseVersion string `json:",omitempty"` ReleaseVersion string `json:",omitempty"`
ReleaseAconfigValueSets []string `json:",omitempty"` ReleaseAconfigValueSets []string `json:",omitempty"`
KeepVndk *bool `json:",omitempty"`
} }
func boolPtr(v bool) *bool { func boolPtr(v bool) *bool {

View File

@@ -2275,7 +2275,7 @@ func (library *libraryDecorator) install(ctx ModuleContext, file android.Path) {
// do not install vndk libs // do not install vndk libs
// vndk libs are packaged into VNDK APEX // vndk libs are packaged into VNDK APEX
if ctx.isVndk() && !ctx.IsVndkExt() { if ctx.isVndk() && !ctx.IsVndkExt() && !ctx.Config().IsVndkDeprecated() {
return return
} }
} else if library.hasStubsVariants() && !ctx.Host() && ctx.directlyInAnyApex() { } else if library.hasStubsVariants() && !ctx.Host() && ctx.directlyInAnyApex() {