aboutsummaryrefslogtreecommitdiffstats
path: root/android
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2018-06-20 17:56:23 -0700
committerandroid-build-merger <android-build-merger@google.com>2018-06-20 17:56:23 -0700
commitee4898cc40a8aa3c66b7b1c0fdf0ba09b92125f4 (patch)
treef284a5bd6ec0f4543986992cd90c2c026887afa7 /android
parent4e00c2c14ddf12a48242f94bd7fb5e41804da371 (diff)
parenta1ce2a0071ce970b5e1c50e69e299ec3c12620e4 (diff)
downloadbuild_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.go9
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))