Remove GeneratingPrimaryBuilder(). am: d7ce8402d8

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1636427

Change-Id: Ifcd4f1eae242de68942da39ebfc6c9875698c6b9
This commit is contained in:
Lukacs T. Berki
2021-03-17 13:33:13 +00:00
committed by Automerger Merge Worker
2 changed files with 5 additions and 8 deletions

View File

@@ -131,7 +131,7 @@ func main() {
// the incorrect results from the first pass, and file I/O is expensive.
firstCtx := newContext(configuration)
configuration.SetStopBefore(bootstrap.StopBeforeWriteNinja)
bootstrap.Main(firstCtx.Context, configuration, extraNinjaDeps...)
bootstrap.Main(firstCtx.Context, configuration, false, extraNinjaDeps...)
// Invoke bazel commands and save results for second pass.
if err := configuration.BazelContext.InvokeBazel(); err != nil {
fmt.Fprintf(os.Stderr, "%s", err)
@@ -144,10 +144,10 @@ func main() {
os.Exit(1)
}
ctx = newContext(secondPassConfig)
bootstrap.Main(ctx.Context, secondPassConfig, extraNinjaDeps...)
bootstrap.Main(ctx.Context, secondPassConfig, false, extraNinjaDeps...)
} else {
ctx = newContext(configuration)
bootstrap.Main(ctx.Context, configuration, extraNinjaDeps...)
bootstrap.Main(ctx.Context, configuration, false, extraNinjaDeps...)
}
// Convert the Soong module graph into Bazel BUILD files.
@@ -206,7 +206,7 @@ func runBp2Build(srcDir string, configuration android.Config) {
// Run the loading and analysis pipeline to prepare the graph of regular
// Modules parsed from Android.bp files, and the BazelTargetModules mapped
// from the regular Modules.
bootstrap.Main(bp2buildCtx.Context, configuration, extraNinjaDeps...)
bootstrap.Main(bp2buildCtx.Context, configuration, false, extraNinjaDeps...)
// Run the code-generation phase to convert BazelTargetModules to BUILD files
// and print conversion metrics to the user.

View File

@@ -70,10 +70,6 @@ type BlueprintConfig struct {
ninjaBuildDir string
}
func (c BlueprintConfig) GeneratingPrimaryBuilder() bool {
return true
}
func (c BlueprintConfig) SrcDir() string {
return "."
}
@@ -101,6 +97,7 @@ func bootstrapBlueprint(ctx Context, config Config) {
args.OutFile = shared.JoinPath(config.SoongOutDir(), ".bootstrap/build.ninja")
args.DepFile = shared.JoinPath(config.SoongOutDir(), ".bootstrap/build.ninja.d")
args.GlobFile = shared.JoinPath(config.SoongOutDir(), ".bootstrap/soong-build-globs.ninja")
args.GeneratingPrimaryBuilder = true
blueprintCtx := blueprint.NewContext()
blueprintCtx.SetIgnoreUnknownModuleTypes(true)