Merge "Remove dependency from vendor_snapshot to each module"

This commit is contained in:
Treehugger Robot 2021-02-26 03:57:42 +00:00 committed by Gerrit Code Review
commit a777d960ab
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))
snapshotMap := make(map[string]string)
for _, name := range names {
decoratedNames = append(decoratedNames, name+
snapshotMap[name] = name +
snapshotSuffix + moduleSuffix +
s.baseSnapshot.version() +
"."+ctx.Arch().ArchType.Name)
"." + 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)
}
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",