summaryrefslogtreecommitdiff
path: root/android/singleton.go
diff options
context:
space:
mode:
author Cole Faust <colefaust@google.com> 2024-03-21 17:58:43 -0700
committer Cole Faust <colefaust@google.com> 2024-03-25 17:19:24 -0700
commit02987bd9d275fde4dc47fc404644748d5639bd72 (patch)
treeb24994b590bf359fac54fa792383b6a4f0f6e0cd /android/singleton.go
parent0aa21cc8e2183a13452fce4b7e3a69813fe2a1fd (diff)
Implement OtherModulePropertyErrorf proxies
Also move EvaluateConfiguration() to a standalone configurationEvalutor object, which can be constructed from a ModuleBase and a minimial context. This allows us to evaluate configurable properties in scenarios where we don't have much more than the module. Bug: 323382414 Test: m nothing --no-skip-soong-tests Change-Id: I2d1c9f42a469c399f34c759410509aeae095becb
Diffstat (limited to 'android/singleton.go')
-rw-r--r--android/singleton.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/android/singleton.go b/android/singleton.go
index 5f939967c..76df1ebba 100644
--- a/android/singleton.go
+++ b/android/singleton.go
@@ -87,6 +87,9 @@ type SingletonContext interface {
// builder whenever a file matching the pattern as added or removed, without rerunning if a
// file that does not match the pattern is added to a searched directory.
GlobWithDeps(pattern string, excludes []string) ([]string, error)
+
+ // OtherModulePropertyErrorf reports an error on the line number of the given property of the given module
+ OtherModulePropertyErrorf(module Module, property string, format string, args ...interface{})
}
type singletonAdaptor struct {
@@ -279,3 +282,7 @@ func (s *singletonContextAdaptor) ModuleVariantsFromName(referer Module, name st
func (s *singletonContextAdaptor) moduleProvider(module blueprint.Module, provider blueprint.AnyProviderKey) (any, bool) {
return s.SingletonContext.ModuleProvider(module, provider)
}
+
+func (s *singletonContextAdaptor) OtherModulePropertyErrorf(module Module, property string, format string, args ...interface{}) {
+ s.blueprintSingletonContext().OtherModulePropertyErrorf(module, property, format, args)
+}