Rewrite snapshot dependencies for vndk-ext

VNDK-ext libraries have dependency on VNDK libraries. When building
against snapshots, the dependency must be rewritten with the
snapshots.

Bug: 194864314
Test: m nothing
Change-Id: I1244c6a6590e89b344ab39514bb5142d36b04268
This commit is contained in:
Justin Yun
2021-07-28 17:04:44 +09:00
parent d7b95f94a1
commit 27b9572433
2 changed files with 14 additions and 1 deletions

View File

@@ -2312,7 +2312,7 @@ func (c *Module) DepsMutator(actx android.BottomUpMutatorContext) {
actx.AddVariationDependencies([]blueprint.Variation{ actx.AddVariationDependencies([]blueprint.Variation{
c.ImageVariation(), c.ImageVariation(),
{Mutator: "link", Variation: "shared"}, {Mutator: "link", Variation: "shared"},
}, vndkExtDepTag, vndkdep.getVndkExtendsModuleName()) }, vndkExtDepTag, RewriteSnapshotLib(vndkdep.getVndkExtendsModuleName(), GetSnapshot(c, &snapshotInfo, actx).SharedLibs))
} }
} }
} }

View File

@@ -459,6 +459,19 @@ func TestVendorSnapshotUse(t *testing.T) {
srcs: ["client.cpp"], 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 { cc_binary {
name: "bin_without_snapshot", name: "bin_without_snapshot",
vendor: true, vendor: true,