Switch PackageContext functions to take a ctx

So that the Path and similar functions can be used directly, without
manually adding something like configErrorWrapper (it just uses it all
the time now).

Test: out/soong/build.ninja is identical
Change-Id: I8cb524b09a84d0b8357d7c3501c71270af411e17
This commit is contained in:
Dan Willemsen
2018-03-12 13:24:09 -07:00
parent a052599bb6
commit 54daaf0371
7 changed files with 144 additions and 178 deletions

View File

@@ -27,8 +27,8 @@ var (
// Wrapper that grabs value of val late so it can be initialized by a later module's init function
func errorProneVar(name string, val *string) {
pctx.VariableFunc(name, func(config android.Config) (string, error) {
return *val, nil
pctx.VariableFunc(name, func(android.PackageVarContext) string {
return *val
})
}