Merge "Remove dependency from vendor_snapshot to each module"
This commit is contained in:
commit
a777d960ab
2 changed files with 11 additions and 15 deletions
|
@ -284,23 +284,14 @@ func (s *snapshot) DepsMutator(ctx android.BottomUpMutatorContext) {
|
||||||
collectSnapshotMap := func(variations []blueprint.Variation, depTag blueprint.DependencyTag,
|
collectSnapshotMap := func(variations []blueprint.Variation, depTag blueprint.DependencyTag,
|
||||||
names []string, snapshotSuffix, moduleSuffix string) map[string]string {
|
names []string, snapshotSuffix, moduleSuffix string) map[string]string {
|
||||||
|
|
||||||
decoratedNames := make([]string, 0, len(names))
|
snapshotMap := make(map[string]string)
|
||||||
for _, name := range names {
|
for _, name := range names {
|
||||||
decoratedNames = append(decoratedNames, name+
|
snapshotMap[name] = name +
|
||||||
snapshotSuffix + moduleSuffix +
|
snapshotSuffix + moduleSuffix +
|
||||||
s.baseSnapshot.version() +
|
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
|
return snapshotMap
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -416,7 +416,12 @@ func TestVendorSnapshotUse(t *testing.T) {
|
||||||
name: "libvendor",
|
name: "libvendor",
|
||||||
version: "BOARD",
|
version: "BOARD",
|
||||||
target_arch: "arm64",
|
target_arch: "arm64",
|
||||||
|
compile_multilib: "64",
|
||||||
vendor: true,
|
vendor: true,
|
||||||
|
shared_libs: [
|
||||||
|
"libvendor_without_snapshot",
|
||||||
|
"libvendor_available",
|
||||||
|
],
|
||||||
arch: {
|
arch: {
|
||||||
arm64: {
|
arm64: {
|
||||||
src: "libvendor.so",
|
src: "libvendor.so",
|
||||||
|
|
Loading…
Reference in a new issue