diff options
author | Justin Yun <justinyun@google.com> | 2018-01-11 14:49:01 +0900 |
---|---|---|
committer | Justin Yun <justinyun@google.com> | 2018-01-19 09:48:45 +0900 |
commit | 74c3f5c9d10cc3893828804c0e7b41b98e863d66 (patch) | |
tree | fa90117867b935ff4aba11406e2f28d53f504dc8 /cc/cc.go | |
parent | 64946fec54ab602abd2ea73e3eb590b97bfd03e5 (diff) | |
download | build_soong-74c3f5c9d10cc3893828804c0e7b41b98e863d66.tar.gz build_soong-74c3f5c9d10cc3893828804c0e7b41b98e863d66.tar.bz2 build_soong-74c3f5c9d10cc3893828804c0e7b41b98e863d66.zip |
Include VNDK snapshot modules only if the arch matches
If the target_arch for the snapshot module does not match with
the build variable TARGET_ARCH, hide the module from the make file.
Bug: 71787263
Test: Install VNDK snapshot v27
lunch aosp_arm64_ab-userdebug; m vndk_v27_arm64
- vndk libs must be installed
m vndk_v27_arm
- no vndk libs must be installed because target does not match
Change-Id: I32ab5004832a4164e1b2c056ad149ede50828b92
Diffstat (limited to 'cc/cc.go')
-rw-r--r-- | cc/cc.go | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1442,12 +1442,17 @@ func vendorMutator(mctx android.BottomUpMutatorContext) { mod := mctx.CreateVariations(vendorMode) vendor := mod[0].(*Module) vendor.Properties.UseVndk = true - } else if _, ok := m.linker.(*vndkPrebuiltLibraryDecorator); ok { + } else if prebuilt, ok := m.linker.(*vndkPrebuiltLibraryDecorator); ok { // Make vendor variants only for the versions in BOARD_VNDK_VERSION and // PRODUCT_EXTRA_VNDK_VERSIONS. mod := mctx.CreateVariations(vendorMode) vendor := mod[0].(*Module) 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() { // This will be available in both /system and /vendor // or a /system directory that is available to vendor. |