• Home
  • Raw
  • Download

Lines Matching refs:ctx

53 func (p *Prebuilt) SingleSourcePath(ctx ModuleContext) Path {
56 ctx.PropertyErrorf("srcs", "missing prebuilt source file")
61 ctx.PropertyErrorf("srcs", "multiple prebuilt source files")
67 return PathForModuleSrc(ctx, (*p.srcs)[0])
70 ctx.PropertyErrorf("src", "missing prebuilt source file")
73 return PathForModuleSrc(ctx, *p.src)
98 func RegisterPrebuiltsPreArchMutators(ctx RegisterMutatorsContext) {
99 ctx.BottomUp("prebuilts", PrebuiltMutator).Parallel()
102 func RegisterPrebuiltsPostDepsMutators(ctx RegisterMutatorsContext) {
103 ctx.TopDown("prebuilt_select", PrebuiltSelectModuleMutator).Parallel()
104 ctx.BottomUp("prebuilt_postdeps", PrebuiltPostDepsMutator).Parallel()
109 func PrebuiltMutator(ctx BottomUpMutatorContext) {
110 if m, ok := ctx.Module().(PrebuiltInterface); ok && m.Prebuilt() != nil {
113 if ctx.OtherModuleExists(name) {
114 ctx.AddReverseDependency(ctx.Module(), prebuiltDepTag, name)
117 ctx.Rename(name)
124 func PrebuiltSelectModuleMutator(ctx TopDownMutatorContext) {
125 if m, ok := ctx.Module().(PrebuiltInterface); ok && m.Prebuilt() != nil {
131 p.properties.UsePrebuilt = p.usePrebuilt(ctx, nil)
133 } else if s, ok := ctx.Module().(Module); ok {
134 ctx.VisitDirectDepsWithTag(prebuiltDepTag, func(m Module) {
136 if p.usePrebuilt(ctx, s) {
149 func PrebuiltPostDepsMutator(ctx BottomUpMutatorContext) {
150 if m, ok := ctx.Module().(PrebuiltInterface); ok && m.Prebuilt() != nil {
155 ctx.ReplaceDependencies(name)
165 func (p *Prebuilt) usePrebuilt(ctx TopDownMutatorContext, source Module) bool {