Merge "Added duplicates checking when extracting source deps."
am: 8596bab0b0
Change-Id: I78f7bcd8b435f6075e089eb2c997031cc6095347
This commit is contained in:
commit
637fc7e4f7
1 changed files with 8 additions and 1 deletions
|
@ -754,9 +754,16 @@ var SourceDepTag sourceDependencyTag
|
|||
// modules listed in srcFiles using ":module" syntax
|
||||
func ExtractSourcesDeps(ctx BottomUpMutatorContext, srcFiles []string) {
|
||||
var deps []string
|
||||
set := make(map[string]bool)
|
||||
|
||||
for _, s := range srcFiles {
|
||||
if m := SrcIsModule(s); m != "" {
|
||||
deps = append(deps, m)
|
||||
if _, found := set[m]; found {
|
||||
ctx.ModuleErrorf("found source dependency duplicate: %q!", m)
|
||||
} else {
|
||||
set[m] = true
|
||||
deps = append(deps, m)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue