cosmetic: mark the determination of ui build steps
Test: m libc Bug: N/A Change-Id: I0e7ba9cfccfe1ecf005b55a5912d1b748c294926
This commit is contained in:
committed by
Usta (Tsering) Shrestha
parent
b1f2bfdb72
commit
6fffdd5fa8
@@ -249,41 +249,7 @@ func Build(ctx Context, config Config) {
|
|||||||
|
|
||||||
SetupPath(ctx, config)
|
SetupPath(ctx, config)
|
||||||
|
|
||||||
what := RunAll
|
what := evaluateWhatToRun(config, ctx.Verboseln)
|
||||||
if config.Checkbuild() {
|
|
||||||
what |= RunBuildTests
|
|
||||||
}
|
|
||||||
if config.SkipConfig() {
|
|
||||||
ctx.Verboseln("Skipping Config as requested")
|
|
||||||
what = what &^ RunProductConfig
|
|
||||||
}
|
|
||||||
if config.SkipKati() {
|
|
||||||
ctx.Verboseln("Skipping Kati as requested")
|
|
||||||
what = what &^ RunKati
|
|
||||||
}
|
|
||||||
if config.SkipKatiNinja() {
|
|
||||||
ctx.Verboseln("Skipping use of Kati ninja as requested")
|
|
||||||
what = what &^ RunKatiNinja
|
|
||||||
}
|
|
||||||
if config.SkipSoong() {
|
|
||||||
ctx.Verboseln("Skipping use of Soong as requested")
|
|
||||||
what = what &^ RunSoong
|
|
||||||
}
|
|
||||||
|
|
||||||
if config.SkipNinja() {
|
|
||||||
ctx.Verboseln("Skipping Ninja as requested")
|
|
||||||
what = what &^ RunNinja
|
|
||||||
}
|
|
||||||
|
|
||||||
if !config.SoongBuildInvocationNeeded() {
|
|
||||||
// This means that the output of soong_build is not needed and thus it would
|
|
||||||
// run unnecessarily. In addition, if this code wasn't there invocations
|
|
||||||
// with only special-cased target names like "m bp2build" would result in
|
|
||||||
// passing Ninja the empty target list and it would then build the default
|
|
||||||
// targets which is not what the user asked for.
|
|
||||||
what = what &^ RunNinja
|
|
||||||
what = what &^ RunKati
|
|
||||||
}
|
|
||||||
|
|
||||||
if config.StartGoma() {
|
if config.StartGoma() {
|
||||||
startGoma(ctx, config)
|
startGoma(ctx, config)
|
||||||
@@ -359,6 +325,46 @@ func Build(ctx Context, config Config) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func evaluateWhatToRun(config Config, verboseln func(v ...interface{})) int {
|
||||||
|
//evaluate what to run
|
||||||
|
what := RunAll
|
||||||
|
if config.Checkbuild() {
|
||||||
|
what |= RunBuildTests
|
||||||
|
}
|
||||||
|
if config.SkipConfig() {
|
||||||
|
verboseln("Skipping Config as requested")
|
||||||
|
what = what &^ RunProductConfig
|
||||||
|
}
|
||||||
|
if config.SkipKati() {
|
||||||
|
verboseln("Skipping Kati as requested")
|
||||||
|
what = what &^ RunKati
|
||||||
|
}
|
||||||
|
if config.SkipKatiNinja() {
|
||||||
|
verboseln("Skipping use of Kati ninja as requested")
|
||||||
|
what = what &^ RunKatiNinja
|
||||||
|
}
|
||||||
|
if config.SkipSoong() {
|
||||||
|
verboseln("Skipping use of Soong as requested")
|
||||||
|
what = what &^ RunSoong
|
||||||
|
}
|
||||||
|
|
||||||
|
if config.SkipNinja() {
|
||||||
|
verboseln("Skipping Ninja as requested")
|
||||||
|
what = what &^ RunNinja
|
||||||
|
}
|
||||||
|
|
||||||
|
if !config.SoongBuildInvocationNeeded() {
|
||||||
|
// This means that the output of soong_build is not needed and thus it would
|
||||||
|
// run unnecessarily. In addition, if this code wasn't there invocations
|
||||||
|
// with only special-cased target names like "m bp2build" would result in
|
||||||
|
// passing Ninja the empty target list and it would then build the default
|
||||||
|
// targets which is not what the user asked for.
|
||||||
|
what = what &^ RunNinja
|
||||||
|
what = what &^ RunKati
|
||||||
|
}
|
||||||
|
return what
|
||||||
|
}
|
||||||
|
|
||||||
var distWaitGroup sync.WaitGroup
|
var distWaitGroup sync.WaitGroup
|
||||||
|
|
||||||
// waitForDist waits for all backgrounded distGzipFile and distFile writes to finish
|
// waitForDist waits for all backgrounded distGzipFile and distFile writes to finish
|
||||||
|
Reference in New Issue
Block a user