diff options
author | Colin Cross <ccross@android.com> | 2018-06-20 17:56:23 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-06-20 17:56:23 -0700 |
commit | ee4898cc40a8aa3c66b7b1c0fdf0ba09b92125f4 (patch) | |
tree | f284a5bd6ec0f4543986992cd90c2c026887afa7 /android | |
parent | 4e00c2c14ddf12a48242f94bd7fb5e41804da371 (diff) | |
parent | a1ce2a0071ce970b5e1c50e69e299ec3c12620e4 (diff) | |
download | build_soong-ee4898cc40a8aa3c66b7b1c0fdf0ba09b92125f4.tar.gz build_soong-ee4898cc40a8aa3c66b7b1c0fdf0ba09b92125f4.tar.bz2 build_soong-ee4898cc40a8aa3c66b7b1c0fdf0ba09b92125f4.zip |
Update soong for blueprint change to allow multiple deps
am: a1ce2a0071
Change-Id: I060f9a5b971ace92c815eb3aad67c33f3aed4d2b
Diffstat (limited to 'android')
-rw-r--r-- | android/defaults.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/android/defaults.go b/android/defaults.go index c7045292..d4fbf487 100644 --- a/android/defaults.go +++ b/android/defaults.go @@ -131,11 +131,16 @@ func defaultsDepsMutator(ctx BottomUpMutatorContext) { func defaultsMutator(ctx TopDownMutatorContext) { if defaultable, ok := ctx.Module().(Defaultable); ok && len(defaultable.defaults().Defaults) > 0 { var defaultsList []Defaults + seen := make(map[Defaults]bool) + ctx.WalkDeps(func(module, parent Module) bool { if ctx.OtherModuleDependencyTag(module) == DefaultsDepTag { if defaults, ok := module.(Defaults); ok { - defaultsList = append(defaultsList, defaults) - return len(defaults.defaults().Defaults) > 0 + if !seen[defaults] { + seen[defaults] = true + defaultsList = append(defaultsList, defaults) + return len(defaults.defaults().Defaults) > 0 + } } else { ctx.PropertyErrorf("defaults", "module %s is not an defaults module", ctx.OtherModuleName(module)) |