Pass StopBefore as an argument to RunBlueprint. am: a9768e1ad7
am: d77170912f
am: 9ac1235e62
am: a988f811d5
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1820190 Change-Id: I6138fc1545734a94836b63ac9528f4f41cea500a
This commit is contained in:
commit
d1e05148c8
2 changed files with 6 additions and 13 deletions
|
@ -78,7 +78,7 @@ func PrimaryBuilderExtraFlags(args Args, mainNinjaFile string) []string {
|
|||
// Returns the list of dependencies the emitted Ninja files has. These can be
|
||||
// written to the .d file for the output so that it is correctly rebuilt when
|
||||
// needed in case Blueprint is itself invoked from Ninja
|
||||
func RunBlueprint(args Args, ctx *blueprint.Context, config interface{}) []string {
|
||||
func RunBlueprint(args Args, stopBefore StopBefore, ctx *blueprint.Context, config interface{}) []string {
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
|
||||
if args.NoGC {
|
||||
|
@ -139,10 +139,8 @@ func RunBlueprint(args Args, ctx *blueprint.Context, config interface{}) []strin
|
|||
}
|
||||
ninjaDeps = append(ninjaDeps, extraDeps...)
|
||||
|
||||
if c, ok := config.(ConfigStopBefore); ok {
|
||||
if c.StopBefore() == StopBeforePrepareBuildActions {
|
||||
return ninjaDeps
|
||||
}
|
||||
if stopBefore == StopBeforePrepareBuildActions {
|
||||
return ninjaDeps
|
||||
}
|
||||
|
||||
extraDeps, errs = ctx.PrepareBuildActions(config)
|
||||
|
@ -151,10 +149,8 @@ func RunBlueprint(args Args, ctx *blueprint.Context, config interface{}) []strin
|
|||
}
|
||||
ninjaDeps = append(ninjaDeps, extraDeps...)
|
||||
|
||||
if c, ok := config.(ConfigStopBefore); ok {
|
||||
if c.StopBefore() == StopBeforeWriteNinja {
|
||||
return ninjaDeps
|
||||
}
|
||||
if stopBefore == StopBeforeWriteNinja {
|
||||
return ninjaDeps
|
||||
}
|
||||
|
||||
const outFilePermissions = 0666
|
||||
|
|
|
@ -102,14 +102,11 @@ type BootstrapConfig interface {
|
|||
type StopBefore int
|
||||
|
||||
const (
|
||||
DoEverything StopBefore = 0
|
||||
StopBeforePrepareBuildActions StopBefore = 1
|
||||
StopBeforeWriteNinja StopBefore = 2
|
||||
)
|
||||
|
||||
type ConfigStopBefore interface {
|
||||
StopBefore() StopBefore
|
||||
}
|
||||
|
||||
type PrimaryBuilderInvocation struct {
|
||||
Inputs []string
|
||||
Outputs []string
|
||||
|
|
Loading…
Reference in a new issue