Rework vndk detection

Instead of having a module define `use_vndk: true`, assume that we're
building with the VNDK if we're installed on the vendor partition, and
BOARD_VNDK_VERSION==current. This now matches our behavior in Make.

Once BOARD_VNDK_VERSION!=current, we'll need to disable modules that
need to otherwise compile against the VNDK, since we can only compile
against the current VNDK.

Test: build.ninja for aosp_arm is the same before/after
Test: Ensure there are no boards that set BOARD_VNDK_VERSION
Change-Id: If937fa7bdb119648137af52daebadf486163484b
This commit is contained in:
Dan Willemsen
2017-03-19 18:30:37 -07:00
parent 9e3f627ea7
commit 11b261472a
5 changed files with 11 additions and 31 deletions

View File

@@ -59,6 +59,7 @@ type androidBaseContext interface {
Darwin() bool
Debug() bool
PrimaryArch() bool
Proprietary() bool
AConfig() Config
DeviceConfig() DeviceConfig
}
@@ -87,7 +88,6 @@ type ModuleContext interface {
AddMissingDependencies(deps []string)
Proprietary() bool
InstallInData() bool
RequiredModuleNames() []string
@@ -455,6 +455,7 @@ func (a *ModuleBase) androidBaseContextFactory(ctx blueprint.BaseModuleContext)
return androidBaseContextImpl{
target: a.commonProperties.CompileTarget,
targetPrimary: a.commonProperties.CompilePrimary,
proprietary: a.commonProperties.Proprietary,
config: ctx.Config().(Config),
}
}
@@ -491,6 +492,7 @@ type androidBaseContextImpl struct {
target Target
targetPrimary bool
debug bool
proprietary bool
config Config
}
@@ -619,8 +621,8 @@ func (a *androidBaseContextImpl) DeviceConfig() DeviceConfig {
return DeviceConfig{a.config.deviceConfig}
}
func (a *androidModuleContext) Proprietary() bool {
return a.module.base().commonProperties.Proprietary
func (a *androidBaseContextImpl) Proprietary() bool {
return a.proprietary
}
func (a *androidModuleContext) InstallInData() bool {