Skip to content

Instantly share code, notes, and snippets.

@goyaljai
Last active January 31, 2023 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goyaljai/a75dc0ca9de343be5a22143607afcc46 to your computer and use it in GitHub Desktop.
Save goyaljai/a75dc0ca9de343be5a22143607afcc46 to your computer and use it in GitHub Desktop.
soong.go
func runSoong(ctx Context, config Config) {
...
buildMode := config.bazelBuildMode()
integratedBp2Build := buildMode == mixedBuild
...
bootstrapBlueprint(ctx, config)
...
ninja := func(name, ninjaFile string, targets ...string) {
...
ninjaArgs := []string{
"-d", "keepdepfile",
"-d", "stats",
"-o", "usesphonyoutputs=yes",
"-o", "preremoveoutputs=yes",
"-w", "dupbuild=err",
"-w", "outputdir=err",
"-w", "missingoutfile=err",
"-j", strconv.Itoa(config.Parallel()),
"--frontend_file", fifo,
"-f", filepath.Join(config.SoongOutDir(), ninjaFile),
}
...
}
...
if config.Bp2Build() {
targets = append(targets, config.Bp2BuildMarkerFile())
}
...
ninja("bootstrap", "bootstrap.ninja", targets...)
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment