Wrap singleton ninjaString Eval calls am: 7c2ebdef75
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2654105 Change-Id: I1b40f1aa57d06cee6cacabc1779a7449789986fd Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
fa016e5910
2 changed files with 7 additions and 1 deletions
|
@ -229,6 +229,12 @@ func (l *liveTracker) innerAddNinjaStringDeps(str *ninjaString) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (l *liveTracker) Eval(n *ninjaString) (string, error) {
|
||||||
|
l.Lock()
|
||||||
|
defer l.Unlock()
|
||||||
|
return n.Eval(l.variables)
|
||||||
|
}
|
||||||
|
|
||||||
func (l *liveTracker) RemoveVariableIfLive(v Variable) bool {
|
func (l *liveTracker) RemoveVariableIfLive(v Variable) bool {
|
||||||
l.Lock()
|
l.Lock()
|
||||||
defer l.Unlock()
|
defer l.Unlock()
|
||||||
|
|
|
@ -289,7 +289,7 @@ func (s *singletonContext) Eval(pctx PackageContext, str string) (string, error)
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
return ninjaStr.Eval(s.globals.variables)
|
return s.globals.Eval(ninjaStr)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *singletonContext) RequireNinjaVersion(major, minor, micro int) {
|
func (s *singletonContext) RequireNinjaVersion(major, minor, micro int) {
|
||||||
|
|
Loading…
Reference in a new issue