Return new dependencies from BottomUpMutatorContext.Add*
Propagate new return values of the BottomUpMutatorContext.Add* methods from https://github.com/google/blueprint/pull/316 to Soong. Test: m checkbuild Change-Id: I5378db46adf2f31cc4222b4619cc39db53791610
This commit is contained in:
parent
9f35c3d6dd
commit
4f1dcb0e40
|
@ -210,10 +210,14 @@ type BottomUpMutator func(BottomUpMutatorContext)
|
||||||
type BottomUpMutatorContext interface {
|
type BottomUpMutatorContext interface {
|
||||||
BaseMutatorContext
|
BaseMutatorContext
|
||||||
|
|
||||||
// AddDependency adds a dependency to the given module.
|
// AddDependency adds a dependency to the given module. It returns a slice of modules for each
|
||||||
// Does not affect the ordering of the current mutator pass, but will be ordered
|
// dependency (some entries may be nil).
|
||||||
// correctly for all future mutator passes.
|
//
|
||||||
AddDependency(module blueprint.Module, tag blueprint.DependencyTag, name ...string)
|
// If the mutator is parallel (see MutatorHandle.Parallel), this method will pause until the
|
||||||
|
// new dependencies have had the current mutator called on them. If the mutator is not
|
||||||
|
// parallel this method does not affect the ordering of the current mutator pass, but will
|
||||||
|
// be ordered correctly for all future mutator passes.
|
||||||
|
AddDependency(module blueprint.Module, tag blueprint.DependencyTag, name ...string) []blueprint.Module
|
||||||
|
|
||||||
// AddReverseDependency adds a dependency from the destination to the given module.
|
// AddReverseDependency adds a dependency from the destination to the given module.
|
||||||
// Does not affect the ordering of the current mutator pass, but will be ordered
|
// Does not affect the ordering of the current mutator pass, but will be ordered
|
||||||
|
@ -253,19 +257,30 @@ type BottomUpMutatorContext interface {
|
||||||
SetDefaultDependencyVariation(*string)
|
SetDefaultDependencyVariation(*string)
|
||||||
|
|
||||||
// AddVariationDependencies adds deps as dependencies of the current module, but uses the variations
|
// AddVariationDependencies adds deps as dependencies of the current module, but uses the variations
|
||||||
// argument to select which variant of the dependency to use. A variant of the dependency must
|
// argument to select which variant of the dependency to use. It returns a slice of modules for
|
||||||
// exist that matches the all of the non-local variations of the current module, plus the variations
|
// each dependency (some entries may be nil). A variant of the dependency must exist that matches
|
||||||
// argument.
|
// the all of the non-local variations of the current module, plus the variations argument.
|
||||||
AddVariationDependencies([]blueprint.Variation, blueprint.DependencyTag, ...string)
|
//
|
||||||
|
// If the mutator is parallel (see MutatorHandle.Parallel), this method will pause until the
|
||||||
|
// new dependencies have had the current mutator called on them. If the mutator is not
|
||||||
|
// parallel this method does not affect the ordering of the current mutator pass, but will
|
||||||
|
// be ordered correctly for all future mutator passes.
|
||||||
|
AddVariationDependencies([]blueprint.Variation, blueprint.DependencyTag, ...string) []blueprint.Module
|
||||||
|
|
||||||
// AddFarVariationDependencies adds deps as dependencies of the current module, but uses the
|
// AddFarVariationDependencies adds deps as dependencies of the current module, but uses the
|
||||||
// variations argument to select which variant of the dependency to use. A variant of the
|
// variations argument to select which variant of the dependency to use. It returns a slice of
|
||||||
// dependency must exist that matches the variations argument, but may also have other variations.
|
// modules for each dependency (some entries may be nil). A variant of the dependency must
|
||||||
|
// exist that matches the variations argument, but may also have other variations.
|
||||||
// For any unspecified variation the first variant will be used.
|
// For any unspecified variation the first variant will be used.
|
||||||
//
|
//
|
||||||
// Unlike AddVariationDependencies, the variations of the current module are ignored - the
|
// Unlike AddVariationDependencies, the variations of the current module are ignored - the
|
||||||
// dependency only needs to match the supplied variations.
|
// dependency only needs to match the supplied variations.
|
||||||
AddFarVariationDependencies([]blueprint.Variation, blueprint.DependencyTag, ...string)
|
//
|
||||||
|
// If the mutator is parallel (see MutatorHandle.Parallel), this method will pause until the
|
||||||
|
// new dependencies have had the current mutator called on them. If the mutator is not
|
||||||
|
// parallel this method does not affect the ordering of the current mutator pass, but will
|
||||||
|
// be ordered correctly for all future mutator passes.
|
||||||
|
AddFarVariationDependencies([]blueprint.Variation, blueprint.DependencyTag, ...string) []blueprint.Module
|
||||||
|
|
||||||
// AddInterVariantDependency adds a dependency between two variants of the same module. Variants are always
|
// AddInterVariantDependency adds a dependency between two variants of the same module. Variants are always
|
||||||
// ordered in the same orderas they were listed in CreateVariations, and AddInterVariantDependency does not change
|
// ordered in the same orderas they were listed in CreateVariations, and AddInterVariantDependency does not change
|
||||||
|
@ -452,8 +467,8 @@ func (b *bottomUpMutatorContext) Rename(name string) {
|
||||||
b.Module().base().commonProperties.DebugName = name
|
b.Module().base().commonProperties.DebugName = name
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *bottomUpMutatorContext) AddDependency(module blueprint.Module, tag blueprint.DependencyTag, name ...string) {
|
func (b *bottomUpMutatorContext) AddDependency(module blueprint.Module, tag blueprint.DependencyTag, name ...string) []blueprint.Module {
|
||||||
b.bp.AddDependency(module, tag, name...)
|
return b.bp.AddDependency(module, tag, name...)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *bottomUpMutatorContext) AddReverseDependency(module blueprint.Module, tag blueprint.DependencyTag, name string) {
|
func (b *bottomUpMutatorContext) AddReverseDependency(module blueprint.Module, tag blueprint.DependencyTag, name string) {
|
||||||
|
@ -505,15 +520,15 @@ func (b *bottomUpMutatorContext) SetDefaultDependencyVariation(variation *string
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *bottomUpMutatorContext) AddVariationDependencies(variations []blueprint.Variation, tag blueprint.DependencyTag,
|
func (b *bottomUpMutatorContext) AddVariationDependencies(variations []blueprint.Variation, tag blueprint.DependencyTag,
|
||||||
names ...string) {
|
names ...string) []blueprint.Module {
|
||||||
|
|
||||||
b.bp.AddVariationDependencies(variations, tag, names...)
|
return b.bp.AddVariationDependencies(variations, tag, names...)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *bottomUpMutatorContext) AddFarVariationDependencies(variations []blueprint.Variation,
|
func (b *bottomUpMutatorContext) AddFarVariationDependencies(variations []blueprint.Variation,
|
||||||
tag blueprint.DependencyTag, names ...string) {
|
tag blueprint.DependencyTag, names ...string) []blueprint.Module {
|
||||||
|
|
||||||
b.bp.AddFarVariationDependencies(variations, tag, names...)
|
return b.bp.AddFarVariationDependencies(variations, tag, names...)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *bottomUpMutatorContext) AddInterVariantDependency(tag blueprint.DependencyTag, from, to blueprint.Module) {
|
func (b *bottomUpMutatorContext) AddInterVariantDependency(tag blueprint.DependencyTag, from, to blueprint.Module) {
|
||||||
|
|
Loading…
Reference in New Issue