diff options
| author | 2023-07-19 04:44:51 +0000 | |
|---|---|---|
| committer | 2023-07-19 04:44:51 +0000 | |
| commit | 7d34640ac823d2efa3edf8f21d76eaa20e41a1af (patch) | |
| tree | 4da7b022842d57ebbd3a08d58a9c1d40a30b713a | |
| parent | 7d8231d13e9ffe732dbd7173a733ef73688ef4fc (diff) | |
| parent | e623c58cc645eeb7e8d4dca102c96204a8573c22 (diff) | |
Merge "Install VNDK libraries into vendor or product lib with flag" into main
| -rw-r--r-- | android/config.go | 4 | ||||
| -rw-r--r-- | android/variable.go | 2 | ||||
| -rw-r--r-- | cc/library.go | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/android/config.go b/android/config.go index f95010e05..9cfbc9e4f 100644 --- a/android/config.go +++ b/android/config.go @@ -1355,6 +1355,10 @@ func (c *config) BazelModulesForceEnabledByFlag() map[string]struct{} { return c.bazelForceEnabledModules } +func (c *config) IsVndkDeprecated() bool { + return !Bool(c.productVariables.KeepVndk) +} + func (c *deviceConfig) Arches() []Arch { var arches []Arch for _, target := range c.config.Targets[Android] { diff --git a/android/variable.go b/android/variable.go index f5dddafd8..1c81f3c3d 100644 --- a/android/variable.go +++ b/android/variable.go @@ -475,6 +475,8 @@ type ProductVariables struct { ReleaseVersion string `json:",omitempty"` ReleaseAconfigValueSets []string `json:",omitempty"` + + KeepVndk *bool `json:",omitempty"` } func boolPtr(v bool) *bool { diff --git a/cc/library.go b/cc/library.go index 3dcb5d958..266fa7511 100644 --- a/cc/library.go +++ b/cc/library.go @@ -2275,7 +2275,7 @@ func (library *libraryDecorator) install(ctx ModuleContext, file android.Path) { // do not install vndk libs // vndk libs are packaged into VNDK APEX - if ctx.isVndk() && !ctx.IsVndkExt() { + if ctx.isVndk() && !ctx.IsVndkExt() && !ctx.Config().IsVndkDeprecated() { return } } else if library.hasStubsVariants() && !ctx.Host() && ctx.directlyInAnyApex() { |