diff options
| author | Rashed Abdel-Tawab <rashed@linux.com> | 2019-09-25 16:53:23 -0700 |
|---|---|---|
| committer | Rashed Abdel-Tawab <rashed@linux.com> | 2019-10-06 07:14:51 -0700 |
| commit | 5e5458b61e1ec35e31fe14051aa6c1de6eb4c01d (patch) | |
| tree | e4082cc8769709a25e6c65c17186129ffcb6325c /android | |
| parent | 0908166675da8225faddb8327ed58a649441dce8 (diff) | |
| download | build_soong-5e5458b61e1ec35e31fe14051aa6c1de6eb4c01d.tar.gz build_soong-5e5458b61e1ec35e31fe14051aa6c1de6eb4c01d.tar.bz2 build_soong-5e5458b61e1ec35e31fe14051aa6c1de6eb4c01d.zip | |
soong: Allow setting namespace import to "all" to import every namespace
Change-Id: I5fc78a15349a77fff85b69bf2a92172149ce37fc
Diffstat (limited to 'android')
| -rw-r--r-- | android/namespace.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/android/namespace.go b/android/namespace.go index 84478348..a2bd0242 100644 --- a/android/namespace.go +++ b/android/namespace.go @@ -270,7 +270,12 @@ func (r *NameResolver) FindNamespaceImports(namespace *Namespace) (err error) { for _, name := range namespace.importedNamespaceNames { imp, ok := r.namespaceAt(name) if !ok { - return fmt.Errorf("namespace %v does not exist", name) + if (name != "all") { + return fmt.Errorf("namespace %v does not exist", name) + } else { + namespace.visibleNamespaces = make([]*Namespace, 0, 2+len(namespace.importedNamespaceNames)) + return nil + } } namespace.visibleNamespaces = append(namespace.visibleNamespaces, imp) } |
