Merge "Support pre-build-action hook in blueprint" am: df4ad24151
am: 94222dc0f7
am: eb83859840
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2094704 Change-Id: Ie60371fe96b9522f4462fc8f6cc6fe035d928bda Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
3d7627ee58
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