Skip creating vendor variants for native_bridge modules
native_bridge modules may not have vendor variants because they are
used only for native_loader.
Bug: 140702618
Bug: 137709824
Test: lunch aosp_cf_x86_phone-userdebug && make
Change-Id: Ic9f4abff22597693e66eef520cd1101b5e8c8938
diff --git a/cc/cc.go b/cc/cc.go
index 2ff3434..f97ef5a 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -2323,6 +2323,9 @@
// If the device isn't compiling against the VNDK, we always
// use the core mode.
coreVariantNeeded = true
+ } else if m.Target().NativeBridge == android.NativeBridgeEnabled {
+ // Skip creating vendor variants for natvie bridge modules
+ coreVariantNeeded = true
} else if _, ok := m.linker.(*llndkStubDecorator); ok {
// LL-NDK stubs only exist in the vendor variant, since the
// real libraries will be used in the core variant.