Merge "Remove unused parameter to newContext." am: 0e3aaa47aa

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4a910654fee12a3e31d4394a1bef0fe5599d6366
This commit is contained in:
Treehugger Robot
2021-01-19 13:35:57 +00:00
committed by Automerger Merge Worker

View File

@@ -57,7 +57,7 @@ func bazelConversionRequested(configuration android.Config) bool {
return configuration.IsEnvTrue("CONVERT_TO_BAZEL")
}
func newContext(srcDir string, configuration android.Config) *android.Context {
func newContext(configuration android.Config) *android.Context {
ctx := android.NewContext(configuration)
if bazelConversionRequested(configuration) {
// Register an alternate set of singletons and mutators for bazel
@@ -106,7 +106,7 @@ func main() {
// needed to correctly evaluate the tree in the second pass.
// TODO(cparsons): Don't output any ninja file, as the second pass will overwrite
// the incorrect results from the first pass, and file I/O is expensive.
firstCtx := newContext(srcDir, configuration)
firstCtx := newContext(configuration)
configuration.SetStopBefore(bootstrap.StopBeforeWriteNinja)
bootstrap.Main(firstCtx.Context, configuration, extraNinjaDeps...)
// Invoke bazel commands and save results for second pass.
@@ -120,10 +120,10 @@ func main() {
fmt.Fprintf(os.Stderr, "%s", err)
os.Exit(1)
}
ctx = newContext(srcDir, secondPassConfig)
ctx = newContext(secondPassConfig)
bootstrap.Main(ctx.Context, secondPassConfig, extraNinjaDeps...)
} else {
ctx = newContext(srcDir, configuration)
ctx = newContext(configuration)
bootstrap.Main(ctx.Context, configuration, extraNinjaDeps...)
}