apex: set ":vndk" as required for vendor apexes
When a vendor APEX sets use_vndk_as_stable: true, then the apex doesn't
bundle VNDK libraries but instead it uses them from the "vndk" namespace
at runtime.
":vndk" is a pseudo-name for VNDK libraries, which is processed by
linkerconfig so that the generated linker configuration allows the
namespace for the apex to access VNDK libs.
Bug: 159576928
Test: test with a test-only vendor apex
it runs okay with VNDK libs. (lsof shows that it opens libs from
VNDK APEX)
Change-Id: I924ce0fea696162575f59589b8f858deddf436b3
diff --git a/apex/apex.go b/apex/apex.go
index f9c902c..3cac0c9 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -2162,10 +2162,7 @@
return false
}
if cc.UseVndk() && proptools.Bool(a.properties.Use_vndk_as_stable) && cc.IsVndk() {
- // For vendor APEX with use_vndk_as_stable: true, we don't include VNDK libs
- // and use them from VNDK APEX.
- // TODO(b/159576928): add "vndk" as requiredDeps so that linkerconfig can make "vndk"
- // linker namespace avaiable to this apex.
+ requireNativeLibs = append(requireNativeLibs, ":vndk")
return false
}
af := apexFileForNativeLibrary(ctx, cc, handleSpecialLibs)