diff --git a/cc/cc.go b/cc/cc.go index 1ee113765..39d89e595 100644 --- a/cc/cc.go +++ b/cc/cc.go @@ -2312,7 +2312,7 @@ func (c *Module) DepsMutator(actx android.BottomUpMutatorContext) { actx.AddVariationDependencies([]blueprint.Variation{ c.ImageVariation(), {Mutator: "link", Variation: "shared"}, - }, vndkExtDepTag, vndkdep.getVndkExtendsModuleName()) + }, vndkExtDepTag, RewriteSnapshotLib(vndkdep.getVndkExtendsModuleName(), GetSnapshot(c, &snapshotInfo, actx).SharedLibs)) } } } diff --git a/cc/vendor_snapshot_test.go b/cc/vendor_snapshot_test.go index ceffb29c7..ca2f56924 100644 --- a/cc/vendor_snapshot_test.go +++ b/cc/vendor_snapshot_test.go @@ -459,6 +459,19 @@ func TestVendorSnapshotUse(t *testing.T) { srcs: ["client.cpp"], } + cc_library_shared { + name: "libvndkext", + vendor: true, + nocrt: true, + no_libcrt: true, + stl: "none", + system_shared_libs: [], + vndk: { + extends: "libvndk", + enabled: true, + } + } + cc_binary { name: "bin_without_snapshot", vendor: true,