Add descriptions to soong_build actions.

[  0% 0/5 ] generating Soong docs at out/soong/docs/soong_build.html
0:03 analyzing Android.bp files and generating ninja file at out/soong/build.ninja
0:03 converting Android.bp files to BUILD files at out/soong/bp2build
0:03 generating the Soong module graph at out/soong/module-graph.json
0:03 generating the Soong module graph as a Bazel workspace at out/soong/queryview
0:03 generating Soong docs at out/soong/docs/soong_build.html

Test: m soong_docs json-module-graph bp2build queryview nothing
Change-Id: I33abb8828ead9ef999ffa1a6c9c4b016957c6dd1
This commit is contained in:
Jingwen Chen 2021-12-06 13:27:43 +00:00
parent a86cbd4a49
commit 78fd87f25a

View file

@ -153,7 +153,12 @@ func fileExists(path string) (bool, error) {
return true, nil
}
func primaryBuilderInvocation(config Config, name string, output string, specificArgs []string) bootstrap.PrimaryBuilderInvocation {
func primaryBuilderInvocation(
config Config,
name string,
output string,
specificArgs []string,
description string) bootstrap.PrimaryBuilderInvocation {
commonArgs := make([]string, 0, 0)
if !config.skipSoongTests {
@ -178,9 +183,10 @@ func primaryBuilderInvocation(config Config, name string, output string, specifi
allArgs = append(allArgs, "Android.bp")
return bootstrap.PrimaryBuilderInvocation{
Inputs: []string{"Android.bp"},
Outputs: []string{output},
Args: allArgs,
Inputs: []string{"Android.bp"},
Outputs: []string{output},
Args: allArgs,
Description: description,
}
}
@ -232,7 +238,9 @@ func bootstrapBlueprint(ctx Context, config Config) {
config,
soongBuildTag,
config.SoongNinjaFile(),
mainSoongBuildExtraArgs)
mainSoongBuildExtraArgs,
fmt.Sprintf("analyzing Android.bp files and generating ninja file at %s", config.SoongNinjaFile()),
)
if config.bazelBuildMode() == mixedBuild {
// Mixed builds call Bazel from soong_build and they therefore need the
@ -248,7 +256,9 @@ func bootstrapBlueprint(ctx Context, config Config) {
config.Bp2BuildMarkerFile(),
[]string{
"--bp2build_marker", config.Bp2BuildMarkerFile(),
})
},
fmt.Sprintf("converting Android.bp files to BUILD files at %s/bp2build", config.SoongOutDir()),
)
jsonModuleGraphInvocation := primaryBuilderInvocation(
config,
@ -256,15 +266,20 @@ func bootstrapBlueprint(ctx Context, config Config) {
config.ModuleGraphFile(),
[]string{
"--module_graph_file", config.ModuleGraphFile(),
})
},
fmt.Sprintf("generating the Soong module graph at %s", config.ModuleGraphFile()),
)
queryviewDir := filepath.Join(config.SoongOutDir(), "queryview")
queryviewInvocation := primaryBuilderInvocation(
config,
queryviewTag,
config.QueryviewMarkerFile(),
[]string{
"--bazel_queryview_dir", filepath.Join(config.SoongOutDir(), "queryview"),
})
"--bazel_queryview_dir", queryviewDir,
},
fmt.Sprintf("generating the Soong module graph as a Bazel workspace at %s", queryviewDir),
)
soongDocsInvocation := primaryBuilderInvocation(
config,
@ -272,7 +287,9 @@ func bootstrapBlueprint(ctx Context, config Config) {
config.SoongDocsHtml(),
[]string{
"--soong_docs", config.SoongDocsHtml(),
})
},
fmt.Sprintf("generating Soong docs at %s", config.SoongDocsHtml()),
)
globFiles := []string{
config.NamedGlobFile(soongBuildTag),