diff --git a/cc/snapshot_prebuilt.go b/cc/snapshot_prebuilt.go index 62daafde4..69b994861 100644 --- a/cc/snapshot_prebuilt.go +++ b/cc/snapshot_prebuilt.go @@ -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 } diff --git a/cc/vendor_snapshot_test.go b/cc/vendor_snapshot_test.go index 7e283fb89..4b76f5163 100644 --- a/cc/vendor_snapshot_test.go +++ b/cc/vendor_snapshot_test.go @@ -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",