summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Lukacs T. Berki <lberki@google.com> 2021-03-17 14:03:51 +0100
committer Lukacs T. Berki <lberki@google.com> 2021-03-17 14:08:50 +0100
commitd7ce8402d8895b7ba9d13092d27037784a43cc0e (patch)
tree1f7ec5847debb1d44ece92463bb3fd626663658a
parent059972c214ddf757643303c13d84d4490ce23880 (diff)
Remove GeneratingPrimaryBuilder().
It's replaced with a flag in bootstrap.Args . Test: "m nothing" (presubmits take a full workday these days) Change-Id: Ia0bfa2091013e389890e583c559006077806af99
-rw-r--r--cmd/soong_build/main.go8
-rw-r--r--ui/build/soong.go5
2 files changed, 5 insertions, 8 deletions
diff --git a/cmd/soong_build/main.go b/cmd/soong_build/main.go
index 67a4ffb47..11d362067 100644
--- a/cmd/soong_build/main.go
+++ b/cmd/soong_build/main.go
@@ -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.
diff --git a/ui/build/soong.go b/ui/build/soong.go
index a8a65b1ea..fee5723bb 100644
--- a/ui/build/soong.go
+++ b/ui/build/soong.go
@@ -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)