Merge "Helper function to register go module types in tests" am: f99595ba0d
am: 74652490f3
am: 8dc45fc0e9
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/2627056 Change-Id: Ia1adf67a8c85303f1c3f3ea9d6c1565041eaa1a5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
3f24bff0b4
1 changed files with 7 additions and 2 deletions
|
@ -41,6 +41,12 @@ type Args struct {
|
||||||
TraceFile string
|
TraceFile string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RegisterGoModuleTypes adds module types to build tools written in golang
|
||||||
|
func RegisterGoModuleTypes(ctx *blueprint.Context) {
|
||||||
|
ctx.RegisterModuleType("bootstrap_go_package", newGoPackageModuleFactory())
|
||||||
|
ctx.RegisterModuleType("blueprint_go_binary", newGoBinaryModuleFactory())
|
||||||
|
}
|
||||||
|
|
||||||
// RunBlueprint emits `args.OutFile` (a Ninja file) and returns the list of
|
// RunBlueprint emits `args.OutFile` (a Ninja file) and returns the list of
|
||||||
// its dependencies. These can be written to a `${args.OutFile}.d` file
|
// its dependencies. These can be written to a `${args.OutFile}.d` file
|
||||||
// so that it is correctly rebuilt when needed in case Blueprint is itself
|
// so that it is correctly rebuilt when needed in case Blueprint is itself
|
||||||
|
@ -90,9 +96,8 @@ func RunBlueprint(args Args, stopBefore StopBefore, ctx *blueprint.Context, conf
|
||||||
ctx.EndEvent("list_modules")
|
ctx.EndEvent("list_modules")
|
||||||
|
|
||||||
ctx.RegisterBottomUpMutator("bootstrap_plugin_deps", pluginDeps)
|
ctx.RegisterBottomUpMutator("bootstrap_plugin_deps", pluginDeps)
|
||||||
ctx.RegisterModuleType("bootstrap_go_package", newGoPackageModuleFactory())
|
|
||||||
ctx.RegisterModuleType("blueprint_go_binary", newGoBinaryModuleFactory())
|
|
||||||
ctx.RegisterSingletonType("bootstrap", newSingletonFactory(), false)
|
ctx.RegisterSingletonType("bootstrap", newSingletonFactory(), false)
|
||||||
|
RegisterGoModuleTypes(ctx)
|
||||||
blueprint.RegisterPackageIncludesModuleType(ctx)
|
blueprint.RegisterPackageIncludesModuleType(ctx)
|
||||||
|
|
||||||
ctx.BeginEvent("parse_bp")
|
ctx.BeginEvent("parse_bp")
|
||||||
|
|
Loading…
Reference in a new issue