Remove the ability to emit Blueprint docs. am: 64ee4262a0 am: 7f5966aea0 am: ba29268a8e

Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1796437

Change-Id: I647f76782e73c1608791bec9e3c0287452f35581
This commit is contained in:
Lukacs T. Berki 2021-08-17 15:41:49 +00:00 committed by Automerger Merge Worker
commit 1daac99edc
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