Last active
January 31, 2023 19:59
-
-
Save goyaljai/3c6e9a462bf36fc4e5560d1a1ae812b0 to your computer and use it in GitHub Desktop.
build.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func Build(ctx Context, config Config) { | |
... | |
what := RunAll | |
... | |
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 what&RunSoong != 0 { | |
runSoong(ctx, config) | |
} | |
if what&RunKati != 0 { | |
genKatiSuffix(ctx, config) | |
runKatiCleanSpec(ctx, config) | |
runKatiBuild(ctx, config) | |
runKatiPackage(ctx, config) | |
ioutil.WriteFile(config.LastKatiSuffixFile(), []byte(config.KatiSuffix()), 0666) // a+rw | |
} | |
... | |
if what&RunNinja != 0 { | |
if what&RunKati != 0 { | |
installCleanIfNecessary(ctx, config) | |
} | |
runNinjaForBuild(ctx, config) | |
} | |
// Currently, using Bazel requires Kati and Soong to run first, so check whether to run Bazel last. | |
if what&RunBazel != 0 { | |
runBazel(ctx, config) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment