Remove the ability to emit Blueprint docs.

This is not necessary anymore now that Blueprint doesn't have a separate
existence and Soong's documentation generation uses a completely
separate code path.

Test: Presubmits.
Change-Id: Ibc9e57379c5f8ee9a06d90fbe81fac314f01ee92
This commit is contained in:
Lukacs T. Berki 2021-08-16 13:42:42 +02:00
parent 0eb24a7041
commit 64ee4262a0
2 changed files with 0 additions and 48 deletions

View file

@ -162,8 +162,6 @@ var (
return toolDir(config), nil
})
docsDir = filepath.Join(mainDir, "docs")
mainDir = filepath.Join("$buildDir", mainSubDir)
bootstrapDir = filepath.Join("$buildDir", bootstrapSubDir)
miniBootstrapDir = filepath.Join("$buildDir", miniBootstrapSubDir)
@ -770,43 +768,6 @@ func (s *singleton) GenerateBuildActions(ctx blueprint.SingletonContext) {
}
if s.config.stage == StageMain {
if primaryBuilderName == "minibp" {
// This is a standalone Blueprint build, so we copy the minibp
// binary to the "bin" directory to make it easier to find.
finalMinibp := filepath.Join("$buildDir", "bin", primaryBuilderName)
ctx.Build(pctx, blueprint.BuildParams{
Rule: cp,
Inputs: []string{primaryBuilderFile},
Outputs: []string{finalMinibp},
})
}
// Generate build system docs for the primary builder. Generating docs reads the source
// files used to build the primary builder, but that dependency will be picked up through
// the dependency on the primary builder itself. There are no dependencies on the
// Blueprints files, as any relevant changes to the Blueprints files would have caused
// a rebuild of the primary builder.
docsFile := filepath.Join(docsDir, primaryBuilderName+".html")
bigbpDocs := ctx.Rule(pctx, "bigbpDocs",
blueprint.RuleParams{
Command: fmt.Sprintf("%s -b $buildDir --docs $out %s", primaryBuilderFile,
s.config.topLevelBlueprintsFile),
CommandDeps: []string{primaryBuilderFile},
Description: fmt.Sprintf("%s docs $out", primaryBuilderName),
})
ctx.Build(pctx, blueprint.BuildParams{
Rule: bigbpDocs,
Outputs: []string{docsFile},
})
// Add a phony target for building the documentation
ctx.Build(pctx, blueprint.BuildParams{
Rule: blueprint.Phony,
Outputs: []string{"blueprint_docs"},
Inputs: []string{docsFile},
})
// Add a phony target for building various tools that are part of blueprint
ctx.Build(pctx, blueprint.BuildParams{
Rule: blueprint.Phony,

View file

@ -68,7 +68,6 @@ func init() {
flag.StringVar(&CmdlineArgs.BuildDir, "b", ".", "the build output directory")
flag.StringVar(&CmdlineArgs.NinjaBuildDir, "n", "", "the ninja builddir directory")
flag.StringVar(&CmdlineArgs.DepFile, "d", "", "the dependency file to output")
flag.StringVar(&CmdlineArgs.DocFile, "docs", "", "build documentation file to output")
flag.StringVar(&CmdlineArgs.Cpuprofile, "cpuprofile", "", "write cpu profile to file")
flag.StringVar(&CmdlineArgs.TraceFile, "trace", "", "write trace to file")
flag.StringVar(&CmdlineArgs.Memprofile, "memprofile", "", "write memory profile to file")
@ -226,14 +225,6 @@ func RunBlueprint(args Args, ctx *blueprint.Context, config interface{}) []strin
}
ninjaDeps = append(ninjaDeps, extraDeps...)
if args.DocFile != "" {
err := writeDocs(ctx, config, absolutePath(args.DocFile))
if err != nil {
fatalErrors([]error{err})
}
return nil
}
if c, ok := config.(ConfigStopBefore); ok {
if c.StopBefore() == StopBeforePrepareBuildActions {
return ninjaDeps