Merge "Support pre-build-action hook in blueprint" am: df4ad24151
am: 94222dc0f7
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2094704 Change-Id: Ie7b1a33da013cd7b78f2c22e8a94295f70d0f6b8 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
eb83859840
2 changed files with 13 additions and 0 deletions
|
@ -113,6 +113,13 @@ func RunBlueprint(args Args, stopBefore StopBefore, ctx *blueprint.Context, conf
|
|||
return ninjaDeps
|
||||
}
|
||||
|
||||
if ctx.BeforePrepareBuildActionsHook != nil {
|
||||
err := ctx.BeforePrepareBuildActionsHook()
|
||||
if err != nil {
|
||||
fatalErrors([]error{err})
|
||||
}
|
||||
}
|
||||
|
||||
extraDeps, errs = ctx.PrepareBuildActions(config)
|
||||
if len(errs) > 0 {
|
||||
fatalErrors(errs)
|
||||
|
|
|
@ -75,6 +75,8 @@ type Context struct {
|
|||
// Used for metrics-related event logging.
|
||||
EventHandler *metrics.EventHandler
|
||||
|
||||
BeforePrepareBuildActionsHook func() error
|
||||
|
||||
moduleFactories map[string]ModuleFactory
|
||||
nameInterface NameInterface
|
||||
moduleGroups []*moduleGroup
|
||||
|
@ -4095,6 +4097,10 @@ func (c *Context) EndEvent(name string) {
|
|||
c.EventHandler.End(name)
|
||||
}
|
||||
|
||||
func (c *Context) SetBeforePrepareBuildActionsHook(hookFn func() error) {
|
||||
c.BeforePrepareBuildActionsHook = hookFn
|
||||
}
|
||||
|
||||
func (c *Context) writeLocalBuildActions(nw *ninjaWriter,
|
||||
defs *localBuildActions) error {
|
||||
|
||||
|
|
Loading…
Reference in a new issue