summaryrefslogtreecommitdiff
path: root/android/module.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2019-03-04 22:33:56 -0800
committer Colin Cross <ccross@android.com> 2019-03-07 18:36:24 +0000
commit1b48842a4b83ba6234d26ff4c77a0884f5008f62 (patch)
tree02cd5ff6fd92a0fbe9de3a5fe34542b75dfbd783 /android/module.go
parent1361449710eaa5ca4bd0acf01489ae0260d768b6 (diff)
Add path properties mutator
Add a mutator pass after DepsMutator that visits every property struct in every module looking for properties that have a tag `android:"path"`, and automatically add a SourceDepTag dependency on any module references (":module-name") found. Uses a cache to store the mapping of property struct type to locations of properties with the tag. Test: android/path_properties_test.go Change-Id: I38c0497843dde4890e9342c3a6f0b402c0720742
Diffstat (limited to 'android/module.go')
-rw-r--r--android/module.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/android/module.go b/android/module.go
index 218df2267..1e6cc8388 100644
--- a/android/module.go
+++ b/android/module.go
@@ -1437,7 +1437,7 @@ func (ctx *androidModuleContext) ExpandSourcesSubDir(srcFiles, excludes []string
if m := SrcIsModule(e); m != "" {
module := ctx.GetDirectDepWithTag(m, SourceDepTag)
if module == nil {
- // Error will have been handled by ExtractSourcesDeps
+ ctx.ModuleErrorf(`missing dependency on %q, is the property annotated with android:"path"?`, m)
continue
}
if srcProducer, ok := module.(SourceFileProducer); ok {
@@ -1454,7 +1454,7 @@ func (ctx *androidModuleContext) ExpandSourcesSubDir(srcFiles, excludes []string
if m := SrcIsModule(s); m != "" {
module := ctx.GetDirectDepWithTag(m, SourceDepTag)
if module == nil {
- // Error will have been handled by ExtractSourcesDeps
+ ctx.ModuleErrorf(`missing dependency on %q, is the property annotated with android:"path"?`, m)
continue
}
if srcProducer, ok := module.(SourceFileProducer); ok {