Merge "Remove dependency from vendor_snapshot to each module" am: a777d960ab

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1607913

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I15a5244d60d1397fcaf471cabc1176eb122c7e47
This commit is contained in:
Treehugger Robot 2021-02-26 04:33:11 +00:00 committed by Automerger Merge Worker
commit 4f8fa43b99
2 changed files with 11 additions and 15 deletions

View file

@ -284,23 +284,14 @@ func (s *snapshot) DepsMutator(ctx android.BottomUpMutatorContext) {
collectSnapshotMap := func(variations []blueprint.Variation, depTag blueprint.DependencyTag,
names []string, snapshotSuffix, moduleSuffix string) map[string]string {
decoratedNames := make([]string, 0, len(names))
for _, name := range names {
decoratedNames = append(decoratedNames, name+
snapshotSuffix+moduleSuffix+
s.baseSnapshot.version()+
"."+ctx.Arch().ArchType.Name)
}
deps := ctx.AddVariationDependencies(variations, depTag, decoratedNames...)
snapshotMap := make(map[string]string)
for _, dep := range deps {
if dep == nil {
continue
}
snapshotMap[dep.(*Module).BaseModuleName()] = ctx.OtherModuleName(dep)
for _, name := range names {
snapshotMap[name] = name +
snapshotSuffix + moduleSuffix +
s.baseSnapshot.version() +
"." + ctx.Arch().ArchType.Name
}
return snapshotMap
}

View file

@ -416,7 +416,12 @@ func TestVendorSnapshotUse(t *testing.T) {
name: "libvendor",
version: "BOARD",
target_arch: "arm64",
compile_multilib: "64",
vendor: true,
shared_libs: [
"libvendor_without_snapshot",
"libvendor_available",
],
arch: {
arm64: {
src: "libvendor.so",