Fix and test vendor public libraries for product modules
Vendor public libraries are checked for product modules, but never reached because the VNDK check occurs first, and wouldn't work anyways because vendor_public_library did not have the product_available property. Reorder the rewrite checks and add VendorProperties, and add a test. Bug: 178231622 Test: vendor_public_library_test.go Change-Id: Idbd2802fbd134d22c30600762cb0465633703506
This commit is contained in:
4
cc/cc.go
4
cc/cc.go
@@ -2070,8 +2070,6 @@ func (c *Module) DepsMutator(actx android.BottomUpMutatorContext) {
|
||||
nonvariantLibs = append(nonvariantLibs, rewriteSnapshotLib(entry, getSnapshot().SharedLibs))
|
||||
} else if ctx.useSdk() && inList(name, *getNDKKnownLibs(ctx.Config())) {
|
||||
variantLibs = append(variantLibs, name+ndkLibrarySuffix)
|
||||
} else if ctx.useVndk() {
|
||||
nonvariantLibs = append(nonvariantLibs, rewriteSnapshotLib(entry, getSnapshot().SharedLibs))
|
||||
} else if (ctx.Platform() || ctx.ProductSpecific()) && inList(name, *vendorPublicLibraries) {
|
||||
vendorPublicLib := name + vendorPublicLibrarySuffix
|
||||
if actx.OtherModuleExists(vendorPublicLib) {
|
||||
@@ -2082,6 +2080,8 @@ func (c *Module) DepsMutator(actx android.BottomUpMutatorContext) {
|
||||
// link to the original library.
|
||||
nonvariantLibs = append(nonvariantLibs, name)
|
||||
}
|
||||
} else if ctx.useVndk() {
|
||||
nonvariantLibs = append(nonvariantLibs, rewriteSnapshotLib(entry, getSnapshot().SharedLibs))
|
||||
} else {
|
||||
// put name#version back
|
||||
nonvariantLibs = append(nonvariantLibs, entry)
|
||||
|
Reference in New Issue
Block a user