Only emit enabled VNDK libraries
Disabled VNDK libraries (due to arch mismatch) are no longer emitted to
make variables VNDK_CORE_LIBRARIES and LLNDK_LIBRARIES
Bug: 7456955
Test: choosecombo to aosp_walleye and m -j
Find libclang_rt.ubsan_standalone-<arch>-android in VNDK_CORE_LIBRARIES.
Only aarch64 and arm are found.
Change-Id: Iaa134d07513e39390fe34a31fdfe2e327b190996
diff --git a/cc/vndk.go b/cc/vndk.go
index d417bea..a0d338b 100644
--- a/cc/vndk.go
+++ b/cc/vndk.go
@@ -178,7 +178,7 @@
// gather list of vndk-core, vndk-sp, and ll-ndk libs
func vndkMutator(mctx android.BottomUpMutatorContext) {
- if m, ok := mctx.Module().(*Module); ok {
+ if m, ok := mctx.Module().(*Module); ok && m.Enabled() {
if lib, ok := m.linker.(*llndkStubDecorator); ok {
vndkLibrariesLock.Lock()
defer vndkLibrariesLock.Unlock()