blob: 247eb4d14eb1396842333a4e1a4c83c5a63bb31d [file] [log] [blame]
Colin Cross6362e272015-10-29 15:25:03 -07001// Copyright 2015 Google Inc. All rights reserved.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Colin Cross635c3b02016-05-18 15:37:25 -070015package android
Colin Cross6362e272015-10-29 15:25:03 -070016
Colin Cross795c3772017-03-16 16:50:10 -070017import (
Colin Cross18c46802019-09-24 22:19:02 -070018 "reflect"
19
Colin Cross795c3772017-03-16 16:50:10 -070020 "github.com/google/blueprint"
Colin Cross519917d2017-11-02 16:35:56 -070021 "github.com/google/blueprint/proptools"
Colin Cross795c3772017-03-16 16:50:10 -070022)
Colin Cross6362e272015-10-29 15:25:03 -070023
Jeff Gastonaf3cc2d2017-09-27 17:01:44 -070024// Phases:
25// run Pre-arch mutators
26// run archMutator
27// run Pre-deps mutators
28// run depsMutator
29// run PostDeps mutators
Martin Stjernholm710ec3a2020-01-16 15:12:04 +000030// run FinalDeps mutators (CreateVariations disallowed in this phase)
Jeff Gastonaf3cc2d2017-09-27 17:01:44 -070031// continue on to GenerateAndroidBuildActions
Colin Cross1e676be2016-10-12 14:38:15 -070032
Colin Cross795c3772017-03-16 16:50:10 -070033func registerMutatorsToContext(ctx *blueprint.Context, mutators []*mutator) {
34 for _, t := range mutators {
35 var handle blueprint.MutatorHandle
36 if t.bottomUpMutator != nil {
37 handle = ctx.RegisterBottomUpMutator(t.name, t.bottomUpMutator)
38 } else if t.topDownMutator != nil {
39 handle = ctx.RegisterTopDownMutator(t.name, t.topDownMutator)
40 }
41 if t.parallel {
42 handle.Parallel()
Colin Cross1e676be2016-10-12 14:38:15 -070043 }
44 }
Colin Cross1e676be2016-10-12 14:38:15 -070045}
46
Martin Stjernholm710ec3a2020-01-16 15:12:04 +000047func registerMutators(ctx *blueprint.Context, preArch, preDeps, postDeps, finalDeps []RegisterMutatorFunc) {
Colin Crosscec81712017-07-13 14:43:27 -070048 mctx := &registerMutatorsContext{}
Nan Zhangdb0b9a32017-02-27 10:12:13 -080049
50 register := func(funcs []RegisterMutatorFunc) {
51 for _, f := range funcs {
Colin Crosscec81712017-07-13 14:43:27 -070052 f(mctx)
Nan Zhangdb0b9a32017-02-27 10:12:13 -080053 }
54 }
55
Colin Crosscec81712017-07-13 14:43:27 -070056 register(preArch)
Nan Zhangdb0b9a32017-02-27 10:12:13 -080057
Colin Crosscec81712017-07-13 14:43:27 -070058 register(preDeps)
59
60 mctx.BottomUp("deps", depsMutator).Parallel()
61
62 register(postDeps)
63
Martin Stjernholm710ec3a2020-01-16 15:12:04 +000064 mctx.finalPhase = true
65 register(finalDeps)
66
Colin Crosscec81712017-07-13 14:43:27 -070067 registerMutatorsToContext(ctx, mctx.mutators)
Colin Cross795c3772017-03-16 16:50:10 -070068}
69
70type registerMutatorsContext struct {
Martin Stjernholm710ec3a2020-01-16 15:12:04 +000071 mutators []*mutator
72 finalPhase bool
Colin Cross795c3772017-03-16 16:50:10 -070073}
Colin Cross1e676be2016-10-12 14:38:15 -070074
75type RegisterMutatorsContext interface {
Colin Cross25de6c32019-06-06 14:29:25 -070076 TopDown(name string, m TopDownMutator) MutatorHandle
77 BottomUp(name string, m BottomUpMutator) MutatorHandle
Colin Cross1e676be2016-10-12 14:38:15 -070078}
79
80type RegisterMutatorFunc func(RegisterMutatorsContext)
81
Colin Crosscec81712017-07-13 14:43:27 -070082var preArch = []RegisterMutatorFunc{
Dan Willemsen6e72ef72018-01-26 18:27:02 -080083 RegisterNamespaceMutator,
Paul Duffinaa4162e2020-05-05 11:35:43 +010084
Paul Duffine2453c72019-05-31 14:00:04 +010085 // Rename package module types.
Paul Duffinaa4162e2020-05-05 11:35:43 +010086 //
87 // The package module type does not have a name property, instead its name is determined
88 // by the location of the containing .bp file relative to the root of the file structure
89 // being built by Soong. Unfortunately, due to limitations in LoadHook the module has to
90 // be given a synthetic temporary name which is then fixed up by these mutators.
Paul Duffin593b3c92019-12-05 14:31:48 +000091 RegisterPackageRenamer,
Paul Duffinaa4162e2020-05-05 11:35:43 +010092
93 // Create an association between prebuilt modules and their corresponding source
94 // modules (if any).
Colin Cross5ea9bcc2017-07-27 15:41:32 -070095 RegisterPrebuiltsPreArchMutators,
Paul Duffinaa4162e2020-05-05 11:35:43 +010096
97 // Check the visibility rules are valid.
98 //
99 // This must run after the package renamer mutators so that any issues found during
100 // validation of the package's default_visibility property are reported using the
101 // correct package name and not the synthetic name.
102 //
103 // This must also be run before defaults mutators as the rules for validation are
104 // different before checking the rules than they are afterwards. e.g.
105 // visibility: ["//visibility:private", "//visibility:public"]
106 // would be invalid if specified in a module definition but is valid if it results
107 // from something like this:
108 //
109 // defaults {
110 // name: "defaults",
111 // // Be inaccessible outside a package by default.
112 // visibility: ["//visibility:private"]
113 // }
114 //
115 // defaultable_module {
116 // name: "defaultable_module",
117 // defaults: ["defaults"],
118 // // Override the default.
119 // visibility: ["//visibility:public"]
120 // }
121 //
Paul Duffin593b3c92019-12-05 14:31:48 +0000122 RegisterVisibilityRuleChecker,
Paul Duffinaa4162e2020-05-05 11:35:43 +0100123
124 // Apply properties from defaults modules to the referencing modules.
Colin Cross89536d42017-07-07 14:35:50 -0700125 RegisterDefaultsPreArchMutators,
Paul Duffinaa4162e2020-05-05 11:35:43 +0100126
127 // Gather the visibility rules for all modules for us during visibility enforcement.
128 //
129 // This must come after the defaults mutators to ensure that any visibility supplied
130 // in a defaults module has been successfully applied before the rules are gathered.
Paul Duffin593b3c92019-12-05 14:31:48 +0000131 RegisterVisibilityRuleGatherer,
Colin Crosscec81712017-07-13 14:43:27 -0700132}
133
Colin Crossae4c6182017-09-15 17:33:55 -0700134func registerArchMutator(ctx RegisterMutatorsContext) {
Colin Crossa195f912019-10-16 11:07:20 -0700135 ctx.BottomUp("os", osMutator).Parallel()
Colin Crossfb0c16e2019-11-20 17:12:35 -0800136 ctx.BottomUp("image", imageMutator).Parallel()
Colin Crossae4c6182017-09-15 17:33:55 -0700137 ctx.BottomUp("arch", archMutator).Parallel()
Colin Crossae4c6182017-09-15 17:33:55 -0700138}
139
Colin Crosscec81712017-07-13 14:43:27 -0700140var preDeps = []RegisterMutatorFunc{
Colin Crossae4c6182017-09-15 17:33:55 -0700141 registerArchMutator,
Colin Crosscec81712017-07-13 14:43:27 -0700142}
143
144var postDeps = []RegisterMutatorFunc{
Colin Cross1b488422019-03-04 22:33:56 -0800145 registerPathDepsMutator,
Colin Cross5ea9bcc2017-07-27 15:41:32 -0700146 RegisterPrebuiltsPostDepsMutators,
Paul Duffin593b3c92019-12-05 14:31:48 +0000147 RegisterVisibilityRuleEnforcer,
Artur Satayevc5570ac2020-04-09 16:06:36 +0100148 RegisterNeverallowMutator,
Jaewoong Jungb639a6a2019-05-10 15:16:29 -0700149 RegisterOverridePostDepsMutators,
Colin Crosscec81712017-07-13 14:43:27 -0700150}
Colin Cross1e676be2016-10-12 14:38:15 -0700151
Martin Stjernholm710ec3a2020-01-16 15:12:04 +0000152var finalDeps = []RegisterMutatorFunc{}
153
Colin Cross1e676be2016-10-12 14:38:15 -0700154func PreArchMutators(f RegisterMutatorFunc) {
155 preArch = append(preArch, f)
156}
157
158func PreDepsMutators(f RegisterMutatorFunc) {
159 preDeps = append(preDeps, f)
160}
161
162func PostDepsMutators(f RegisterMutatorFunc) {
163 postDeps = append(postDeps, f)
164}
165
Martin Stjernholm710ec3a2020-01-16 15:12:04 +0000166func FinalDepsMutators(f RegisterMutatorFunc) {
167 finalDeps = append(finalDeps, f)
168}
169
Colin Cross25de6c32019-06-06 14:29:25 -0700170type TopDownMutator func(TopDownMutatorContext)
Colin Cross6362e272015-10-29 15:25:03 -0700171
Colin Cross635c3b02016-05-18 15:37:25 -0700172type TopDownMutatorContext interface {
Colin Crossaabf6792017-11-29 00:27:14 -0800173 BaseModuleContext
Colin Cross3f68a132017-10-23 17:10:29 -0700174
Colin Crosscb55e082019-07-01 15:32:31 -0700175 MutatorName() string
176
Colin Cross3f68a132017-10-23 17:10:29 -0700177 Rename(name string)
Colin Cross3f68a132017-10-23 17:10:29 -0700178
Colin Crosse003c4a2019-09-25 12:58:36 -0700179 CreateModule(ModuleFactory, ...interface{}) Module
Colin Cross6362e272015-10-29 15:25:03 -0700180}
181
Colin Cross25de6c32019-06-06 14:29:25 -0700182type topDownMutatorContext struct {
Colin Crossdc35e212019-06-06 16:13:11 -0700183 bp blueprint.TopDownMutatorContext
Colin Cross0ea8ba82019-06-06 14:33:29 -0700184 baseModuleContext
Colin Cross6362e272015-10-29 15:25:03 -0700185}
186
Colin Cross25de6c32019-06-06 14:29:25 -0700187type BottomUpMutator func(BottomUpMutatorContext)
Colin Cross6362e272015-10-29 15:25:03 -0700188
Colin Cross635c3b02016-05-18 15:37:25 -0700189type BottomUpMutatorContext interface {
Colin Crossaabf6792017-11-29 00:27:14 -0800190 BaseModuleContext
Colin Crossaabf6792017-11-29 00:27:14 -0800191
Colin Crosscb55e082019-07-01 15:32:31 -0700192 MutatorName() string
193
Colin Crossaabf6792017-11-29 00:27:14 -0800194 Rename(name string)
Colin Crossaabf6792017-11-29 00:27:14 -0800195
196 AddDependency(module blueprint.Module, tag blueprint.DependencyTag, name ...string)
197 AddReverseDependency(module blueprint.Module, tag blueprint.DependencyTag, name string)
Colin Cross43b92e02019-11-18 15:28:57 -0800198 CreateVariations(...string) []Module
199 CreateLocalVariations(...string) []Module
Colin Crossaabf6792017-11-29 00:27:14 -0800200 SetDependencyVariation(string)
Jiyong Park1d1119f2019-07-29 21:27:18 +0900201 SetDefaultDependencyVariation(*string)
Colin Crossaabf6792017-11-29 00:27:14 -0800202 AddVariationDependencies([]blueprint.Variation, blueprint.DependencyTag, ...string)
203 AddFarVariationDependencies([]blueprint.Variation, blueprint.DependencyTag, ...string)
204 AddInterVariantDependency(tag blueprint.DependencyTag, from, to blueprint.Module)
205 ReplaceDependencies(string)
Jaewoong Jung9f88ce22019-11-15 10:57:34 -0800206 AliasVariation(variationName string)
Colin Cross6362e272015-10-29 15:25:03 -0700207}
208
Colin Cross25de6c32019-06-06 14:29:25 -0700209type bottomUpMutatorContext struct {
Colin Crossdc35e212019-06-06 16:13:11 -0700210 bp blueprint.BottomUpMutatorContext
Colin Cross0ea8ba82019-06-06 14:33:29 -0700211 baseModuleContext
Martin Stjernholm710ec3a2020-01-16 15:12:04 +0000212 finalPhase bool
Colin Cross6362e272015-10-29 15:25:03 -0700213}
214
Colin Cross25de6c32019-06-06 14:29:25 -0700215func (x *registerMutatorsContext) BottomUp(name string, m BottomUpMutator) MutatorHandle {
Martin Stjernholm710ec3a2020-01-16 15:12:04 +0000216 finalPhase := x.finalPhase
Colin Cross798bfce2016-10-12 14:28:16 -0700217 f := func(ctx blueprint.BottomUpMutatorContext) {
Colin Cross635c3b02016-05-18 15:37:25 -0700218 if a, ok := ctx.Module().(Module); ok {
Colin Cross25de6c32019-06-06 14:29:25 -0700219 actx := &bottomUpMutatorContext{
Colin Crossdc35e212019-06-06 16:13:11 -0700220 bp: ctx,
221 baseModuleContext: a.base().baseModuleContextFactory(ctx),
Martin Stjernholm710ec3a2020-01-16 15:12:04 +0000222 finalPhase: finalPhase,
Colin Cross6362e272015-10-29 15:25:03 -0700223 }
Colin Cross798bfce2016-10-12 14:28:16 -0700224 m(actx)
Colin Cross6362e272015-10-29 15:25:03 -0700225 }
Colin Cross798bfce2016-10-12 14:28:16 -0700226 }
227 mutator := &mutator{name: name, bottomUpMutator: f}
Colin Cross795c3772017-03-16 16:50:10 -0700228 x.mutators = append(x.mutators, mutator)
Colin Cross798bfce2016-10-12 14:28:16 -0700229 return mutator
Colin Cross6362e272015-10-29 15:25:03 -0700230}
231
Colin Cross25de6c32019-06-06 14:29:25 -0700232func (x *registerMutatorsContext) TopDown(name string, m TopDownMutator) MutatorHandle {
Colin Cross798bfce2016-10-12 14:28:16 -0700233 f := func(ctx blueprint.TopDownMutatorContext) {
Colin Cross635c3b02016-05-18 15:37:25 -0700234 if a, ok := ctx.Module().(Module); ok {
Colin Cross25de6c32019-06-06 14:29:25 -0700235 actx := &topDownMutatorContext{
Colin Crossdc35e212019-06-06 16:13:11 -0700236 bp: ctx,
237 baseModuleContext: a.base().baseModuleContextFactory(ctx),
Colin Cross6362e272015-10-29 15:25:03 -0700238 }
Colin Cross798bfce2016-10-12 14:28:16 -0700239 m(actx)
Colin Cross6362e272015-10-29 15:25:03 -0700240 }
Colin Cross798bfce2016-10-12 14:28:16 -0700241 }
242 mutator := &mutator{name: name, topDownMutator: f}
Colin Cross795c3772017-03-16 16:50:10 -0700243 x.mutators = append(x.mutators, mutator)
Colin Cross798bfce2016-10-12 14:28:16 -0700244 return mutator
245}
246
247type MutatorHandle interface {
248 Parallel() MutatorHandle
249}
250
251func (mutator *mutator) Parallel() MutatorHandle {
252 mutator.parallel = true
253 return mutator
Colin Cross6362e272015-10-29 15:25:03 -0700254}
Colin Cross1e676be2016-10-12 14:38:15 -0700255
256func depsMutator(ctx BottomUpMutatorContext) {
Colin Cross6db4a6a2018-08-30 12:52:41 -0700257 if m, ok := ctx.Module().(Module); ok && m.Enabled() {
Colin Cross1e676be2016-10-12 14:38:15 -0700258 m.DepsMutator(ctx)
259 }
260}
Colin Crossd11fcda2017-10-23 17:59:01 -0700261
Colin Cross25de6c32019-06-06 14:29:25 -0700262func (t *topDownMutatorContext) AppendProperties(props ...interface{}) {
Colin Cross519917d2017-11-02 16:35:56 -0700263 for _, p := range props {
Colin Cross25de6c32019-06-06 14:29:25 -0700264 err := proptools.AppendMatchingProperties(t.Module().base().customizableProperties,
Colin Cross519917d2017-11-02 16:35:56 -0700265 p, nil)
266 if err != nil {
267 if propertyErr, ok := err.(*proptools.ExtendPropertyError); ok {
Colin Cross25de6c32019-06-06 14:29:25 -0700268 t.PropertyErrorf(propertyErr.Property, "%s", propertyErr.Err.Error())
Colin Cross519917d2017-11-02 16:35:56 -0700269 } else {
270 panic(err)
271 }
272 }
273 }
274}
275
Colin Cross25de6c32019-06-06 14:29:25 -0700276func (t *topDownMutatorContext) PrependProperties(props ...interface{}) {
Colin Cross519917d2017-11-02 16:35:56 -0700277 for _, p := range props {
Colin Cross25de6c32019-06-06 14:29:25 -0700278 err := proptools.PrependMatchingProperties(t.Module().base().customizableProperties,
Colin Cross519917d2017-11-02 16:35:56 -0700279 p, nil)
280 if err != nil {
281 if propertyErr, ok := err.(*proptools.ExtendPropertyError); ok {
Colin Cross25de6c32019-06-06 14:29:25 -0700282 t.PropertyErrorf(propertyErr.Property, "%s", propertyErr.Err.Error())
Colin Cross519917d2017-11-02 16:35:56 -0700283 } else {
284 panic(err)
285 }
286 }
287 }
288}
Colin Crossdc35e212019-06-06 16:13:11 -0700289
290// android.topDownMutatorContext either has to embed blueprint.TopDownMutatorContext, in which case every method that
291// has an overridden version in android.BaseModuleContext has to be manually forwarded to BaseModuleContext to avoid
292// ambiguous method errors, or it has to store a blueprint.TopDownMutatorContext non-embedded, in which case every
293// non-overridden method has to be forwarded. There are fewer non-overridden methods, so use the latter. The following
294// methods forward to the identical blueprint versions for topDownMutatorContext and bottomUpMutatorContext.
295
Colin Crosscb55e082019-07-01 15:32:31 -0700296func (t *topDownMutatorContext) MutatorName() string {
297 return t.bp.MutatorName()
298}
299
Colin Crossdc35e212019-06-06 16:13:11 -0700300func (t *topDownMutatorContext) Rename(name string) {
301 t.bp.Rename(name)
Colin Cross9a362232019-07-01 15:32:45 -0700302 t.Module().base().commonProperties.DebugName = name
Colin Crossdc35e212019-06-06 16:13:11 -0700303}
304
Colin Crosse003c4a2019-09-25 12:58:36 -0700305func (t *topDownMutatorContext) CreateModule(factory ModuleFactory, props ...interface{}) Module {
Colin Cross18c46802019-09-24 22:19:02 -0700306 inherited := []interface{}{&t.Module().base().commonProperties}
Colin Crosse003c4a2019-09-25 12:58:36 -0700307 module := t.bp.CreateModule(ModuleFactoryAdaptor(factory), append(inherited, props...)...).(Module)
Colin Cross18c46802019-09-24 22:19:02 -0700308
309 if t.Module().base().variableProperties != nil && module.base().variableProperties != nil {
310 src := t.Module().base().variableProperties
311 dst := []interface{}{
312 module.base().variableProperties,
313 // Put an empty copy of the src properties into dst so that properties in src that are not in dst
314 // don't cause a "failed to find property to extend" error.
Colin Cross43e789d2020-01-28 09:46:50 -0800315 proptools.CloneEmptyProperties(reflect.ValueOf(src)).Interface(),
Colin Cross18c46802019-09-24 22:19:02 -0700316 }
317 err := proptools.AppendMatchingProperties(dst, src, nil)
318 if err != nil {
319 panic(err)
320 }
321 }
322
Colin Crosse003c4a2019-09-25 12:58:36 -0700323 return module
Colin Crossdc35e212019-06-06 16:13:11 -0700324}
325
Colin Crosscb55e082019-07-01 15:32:31 -0700326func (b *bottomUpMutatorContext) MutatorName() string {
327 return b.bp.MutatorName()
328}
329
Colin Crossdc35e212019-06-06 16:13:11 -0700330func (b *bottomUpMutatorContext) Rename(name string) {
331 b.bp.Rename(name)
Colin Cross9a362232019-07-01 15:32:45 -0700332 b.Module().base().commonProperties.DebugName = name
Colin Crossdc35e212019-06-06 16:13:11 -0700333}
334
335func (b *bottomUpMutatorContext) AddDependency(module blueprint.Module, tag blueprint.DependencyTag, name ...string) {
336 b.bp.AddDependency(module, tag, name...)
337}
338
339func (b *bottomUpMutatorContext) AddReverseDependency(module blueprint.Module, tag blueprint.DependencyTag, name string) {
340 b.bp.AddReverseDependency(module, tag, name)
341}
342
Colin Cross43b92e02019-11-18 15:28:57 -0800343func (b *bottomUpMutatorContext) CreateVariations(variations ...string) []Module {
Martin Stjernholm710ec3a2020-01-16 15:12:04 +0000344 if b.finalPhase {
345 panic("CreateVariations not allowed in FinalDepsMutators")
346 }
347
Colin Cross9a362232019-07-01 15:32:45 -0700348 modules := b.bp.CreateVariations(variations...)
349
Colin Cross43b92e02019-11-18 15:28:57 -0800350 aModules := make([]Module, len(modules))
Colin Cross9a362232019-07-01 15:32:45 -0700351 for i := range variations {
Colin Cross43b92e02019-11-18 15:28:57 -0800352 aModules[i] = modules[i].(Module)
353 base := aModules[i].base()
Colin Cross9a362232019-07-01 15:32:45 -0700354 base.commonProperties.DebugMutators = append(base.commonProperties.DebugMutators, b.MutatorName())
355 base.commonProperties.DebugVariations = append(base.commonProperties.DebugVariations, variations[i])
356 }
357
Colin Cross43b92e02019-11-18 15:28:57 -0800358 return aModules
Colin Crossdc35e212019-06-06 16:13:11 -0700359}
360
Colin Cross43b92e02019-11-18 15:28:57 -0800361func (b *bottomUpMutatorContext) CreateLocalVariations(variations ...string) []Module {
Martin Stjernholm710ec3a2020-01-16 15:12:04 +0000362 if b.finalPhase {
363 panic("CreateLocalVariations not allowed in FinalDepsMutators")
364 }
365
Colin Cross9a362232019-07-01 15:32:45 -0700366 modules := b.bp.CreateLocalVariations(variations...)
367
Colin Cross43b92e02019-11-18 15:28:57 -0800368 aModules := make([]Module, len(modules))
Colin Cross9a362232019-07-01 15:32:45 -0700369 for i := range variations {
Colin Cross43b92e02019-11-18 15:28:57 -0800370 aModules[i] = modules[i].(Module)
371 base := aModules[i].base()
Colin Cross9a362232019-07-01 15:32:45 -0700372 base.commonProperties.DebugMutators = append(base.commonProperties.DebugMutators, b.MutatorName())
373 base.commonProperties.DebugVariations = append(base.commonProperties.DebugVariations, variations[i])
374 }
375
Colin Cross43b92e02019-11-18 15:28:57 -0800376 return aModules
Colin Crossdc35e212019-06-06 16:13:11 -0700377}
378
379func (b *bottomUpMutatorContext) SetDependencyVariation(variation string) {
380 b.bp.SetDependencyVariation(variation)
381}
382
Jiyong Park1d1119f2019-07-29 21:27:18 +0900383func (b *bottomUpMutatorContext) SetDefaultDependencyVariation(variation *string) {
384 b.bp.SetDefaultDependencyVariation(variation)
385}
386
Colin Crossdc35e212019-06-06 16:13:11 -0700387func (b *bottomUpMutatorContext) AddVariationDependencies(variations []blueprint.Variation, tag blueprint.DependencyTag,
388 names ...string) {
389
390 b.bp.AddVariationDependencies(variations, tag, names...)
391}
392
393func (b *bottomUpMutatorContext) AddFarVariationDependencies(variations []blueprint.Variation,
394 tag blueprint.DependencyTag, names ...string) {
395
396 b.bp.AddFarVariationDependencies(variations, tag, names...)
397}
398
399func (b *bottomUpMutatorContext) AddInterVariantDependency(tag blueprint.DependencyTag, from, to blueprint.Module) {
400 b.bp.AddInterVariantDependency(tag, from, to)
401}
402
403func (b *bottomUpMutatorContext) ReplaceDependencies(name string) {
404 b.bp.ReplaceDependencies(name)
405}
Jaewoong Jung9f88ce22019-11-15 10:57:34 -0800406
407func (b *bottomUpMutatorContext) AliasVariation(variationName string) {
408 b.bp.AliasVariation(variationName)
409}