diff options
| author | Colin Cross <ccross@android.com> | 2015-03-11 16:17:52 -0700 |
|---|---|---|
| committer | Colin Cross <ccross@android.com> | 2015-03-12 17:36:57 -0700 |
| commit | ab6d790165d557a2764f76f6dff6bfba57450310 (patch) | |
| tree | 173d0d0d2d66370240ca39bde1307b6ba6b840bc /live_tracker.go | |
| parent | 7addea35a1e29c53843db684252cd73c1a911c9b (diff) | |
| download | platform_build_blueprint-ab6d790165d557a2764f76f6dff6bfba57450310.tar.gz platform_build_blueprint-ab6d790165d557a2764f76f6dff6bfba57450310.tar.bz2 platform_build_blueprint-ab6d790165d557a2764f76f6dff6bfba57450310.zip | |
Move build actions into modules
Move actionDefs from moduleGroup to moduleInfo. This will result
in multiple build.ninja headers for a single Blueprint file module
if it has multiple variants, each one specifying the variant
used to generate the following rules.
Change-Id: I414cd4d3266da8c2e92118b295569627ddf48cdd
Diffstat (limited to 'live_tracker.go')
| -rw-r--r-- | live_tracker.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/live_tracker.go b/live_tracker.go index 5a74a5b..4157f95 100644 --- a/live_tracker.go +++ b/live_tracker.go @@ -167,3 +167,25 @@ func (l *liveTracker) addNinjaStringDeps(str *ninjaString) error { } return nil } + +func (l *liveTracker) RemoveVariableIfLive(v Variable) bool { + l.Lock() + defer l.Unlock() + + _, isLive := l.variables[v] + if isLive { + delete(l.variables, v) + } + return isLive +} + +func (l *liveTracker) RemoveRuleIfLive(r Rule) bool { + l.Lock() + defer l.Unlock() + + _, isLive := l.rules[r] + if isLive { + delete(l.rules, r) + } + return isLive +} |
