cosmetic: readability am: 4cff07db25
am: 35136c7d74
am: f1f0a2b86d
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2449269 Change-Id: I3f33cbe955e6131dbd18ae05596dcf8772305b37 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
d56dd996a3
1 changed files with 12 additions and 14 deletions
26
context.go
26
context.go
|
@ -3757,32 +3757,30 @@ func (c *Context) AllTargets() (map[string]string, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
targets := map[string]string{}
|
targets := map[string]string{}
|
||||||
|
var collectTargets = func(actionDefs localBuildActions) error {
|
||||||
// Collect all the module build targets.
|
for _, buildDef := range actionDefs.buildDefs {
|
||||||
for _, module := range c.moduleInfo {
|
|
||||||
for _, buildDef := range module.actionDefs.buildDefs {
|
|
||||||
ruleName := buildDef.Rule.fullName(c.pkgNames)
|
ruleName := buildDef.Rule.fullName(c.pkgNames)
|
||||||
for _, output := range append(buildDef.Outputs, buildDef.ImplicitOutputs...) {
|
for _, output := range append(buildDef.Outputs, buildDef.ImplicitOutputs...) {
|
||||||
outputValue, err := output.Eval(c.globalVariables)
|
outputValue, err := output.Eval(c.globalVariables)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return err
|
||||||
}
|
}
|
||||||
targets[outputValue] = ruleName
|
targets[outputValue] = ruleName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
// Collect all the module build targets.
|
||||||
|
for _, module := range c.moduleInfo {
|
||||||
|
if err := collectTargets(module.actionDefs); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Collect all the singleton build targets.
|
// Collect all the singleton build targets.
|
||||||
for _, info := range c.singletonInfo {
|
for _, info := range c.singletonInfo {
|
||||||
for _, buildDef := range info.actionDefs.buildDefs {
|
if err := collectTargets(info.actionDefs); err != nil {
|
||||||
ruleName := buildDef.Rule.fullName(c.pkgNames)
|
return nil, err
|
||||||
for _, output := range append(buildDef.Outputs, buildDef.ImplicitOutputs...) {
|
|
||||||
outputValue, err := output.Eval(c.globalVariables)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
targets[outputValue] = ruleName
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue