From 8177ad29326cfe51486939abeadd9910f9b7bbed Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 4 Nov 2019 10:27:48 -0800 Subject: [PATCH] Add GlobWithDeps to MakeVarsContext It is safe to use GlobWithDeps in MakeVarsContext, the globSingleton is registered in boostrap.Main, which runs after all the Soong singletons (including makeVarsSingleton) are registered. Bug: 143324390 Test: m checkbuild Change-Id: I2edf915c666bd5db535c761bb645a48c4f573a65 --- android/makevars.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/android/makevars.go b/android/makevars.go index c011ea61f..38a028caf 100644 --- a/android/makevars.go +++ b/android/makevars.go @@ -80,6 +80,12 @@ type MakeVarsContext interface { // Eval(). StrictRaw(name, value string) CheckRaw(name, value string) + + // GlobWithDeps returns a list of files that match the specified pattern but do not match any + // of the patterns in excludes. It also adds efficient dependencies to rerun the primary + // 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) } var _ PathContext = MakeVarsContext(nil)