Skip installing the VNDK prebuilt if arch does not match

am: 312ccb974f

Change-Id: If3e8194feb7ab337ef16fd6a30d1408a36194059
This commit is contained in:
Justin Yun
2018-01-23 23:03:35 +00:00
committed by android-build-merger
2 changed files with 5 additions and 6 deletions

View File

@@ -1510,17 +1510,12 @@ func vendorMutator(mctx android.BottomUpMutatorContext) {
mod := mctx.CreateVariations(vendorMode) mod := mctx.CreateVariations(vendorMode)
vendor := mod[0].(*Module) vendor := mod[0].(*Module)
vendor.Properties.UseVndk = true vendor.Properties.UseVndk = true
} else if prebuilt, ok := m.linker.(*vndkPrebuiltLibraryDecorator); ok { } else if _, ok := m.linker.(*vndkPrebuiltLibraryDecorator); ok {
// Make vendor variants only for the versions in BOARD_VNDK_VERSION and // Make vendor variants only for the versions in BOARD_VNDK_VERSION and
// PRODUCT_EXTRA_VNDK_VERSIONS. // PRODUCT_EXTRA_VNDK_VERSIONS.
mod := mctx.CreateVariations(vendorMode) mod := mctx.CreateVariations(vendorMode)
vendor := mod[0].(*Module) vendor := mod[0].(*Module)
vendor.Properties.UseVndk = true vendor.Properties.UseVndk = true
arches := mctx.DeviceConfig().Arches()
if len(arches) == 0 || arches[0].ArchType.String() != prebuilt.arch() {
vendor.Properties.PreventInstall = true
vendor.Properties.HideFromMake = true
}
} else if m.hasVendorVariant() && !vendorSpecific { } else if m.hasVendorVariant() && !vendorSpecific {
// This will be available in both /system and /vendor // This will be available in both /system and /vendor
// or a /system directory that is available to vendor. // or a /system directory that is available to vendor.

View File

@@ -110,6 +110,10 @@ func (p *vndkPrebuiltLibraryDecorator) link(ctx ModuleContext,
} }
func (p *vndkPrebuiltLibraryDecorator) install(ctx ModuleContext, file android.Path) { func (p *vndkPrebuiltLibraryDecorator) install(ctx ModuleContext, file android.Path) {
arches := ctx.DeviceConfig().Arches()
if len(arches) == 0 || arches[0].ArchType.String() != p.arch() {
return
}
if p.shared() { if p.shared() {
if ctx.isVndkSp() { if ctx.isVndkSp() {
p.baseInstaller.subDir = "vndk-sp-" + p.version() p.baseInstaller.subDir = "vndk-sp-" + p.version()