Embed minibp into soong_ui.

This requires linking Blueprint into soong_ui. It lets us avoid the
complicated dance of Ninja files and shell scripts: now the information
as to how soong_build is built is passed directly to Blueprint using a
struct that contains all the information the command line arguments used
to contain.

The ability to run Blueprint from the command line is kept (for now).

Some variables in bootstrap/command.go needed public accessor functions
because soong_build reads them. This will be disentangled by moving the
flag parsing to soong_build.

The presence of the flag definitions in Blueprint means that soong_ui
now also accepts them. This is not a problem in practice because they
are ignored and because soong_ui itself is hidden behind a few layers of
shell scripts.

Test: Presubmits + the new bootstrap_test.sh .
Change-Id: I6dca478f356f56a8aee1e457d71439272351390b
This commit is contained in:
Lukacs T. Berki
2021-03-16 08:55:23 +01:00
parent 645610e791
commit d1e3f1ff08
10 changed files with 487 additions and 56 deletions

View File

@@ -218,6 +218,11 @@ func Build(ctx Context, config Config, what int) {
what = what &^ BuildKati
}
if config.SkipNinja() {
ctx.Verboseln("Skipping Ninja as requested")
what = what &^ BuildNinja
}
if config.StartGoma() {
// Ensure start Goma compiler_proxy
startGoma(ctx, config)
@@ -290,7 +295,7 @@ func Build(ctx Context, config Config, what int) {
}
// Run ninja
runNinja(ctx, config)
runNinjaForBuild(ctx, config)
}
// Currently, using Bazel requires Kati and Soong to run first, so check whether to run Bazel last.