override_* in Soong requires a module to override certain properties of
other module. In that case, values of a slice property (e.g. []string)
should be replaced by the same property value in the overriding module.
However, since proptools only supports Append and Prepend orders where
the original values are kept for slice properties, the behavior
couldn't be implemented. To support the use case, Replace order is
introduced, in which case slice property values are completely replaced.
For other types of properties, the Replace order behaves exactly the
same as the Append order.
Bug: 144338929
Test: m
Change-Id: Iae9feda035177fe6a22e6e8319c0fdaa9e08e85e
* upstream/master:
Add support for module variant aliases
Delay allocating variationMaps until populating them
Use module groups more widely
Test: TreeHugger
Change-Id: Ic591beac1ec34543ca8c1dfe7bc3ba456e763d7c
Adding a dependency on a module with variants can be problematic
if the code adding the dependency is not aware of every mutator
that has created variants. Add an AliasVariations to
BottomUpMutatorContext, which allows a mutator to alias the
original variant of a module to one of the new variants of the
module, which will allow future dependencies to be added using
the original list of variations. The aliases are transient,
and only exist until the next mutator that calls CreateVariations
when visiting the module without also calling AliasVariations.
Test: TestAlises
Change-Id: Ieaa04b5a6bdcb5a1ff5114b1e03460de795d4479
Modules are created with a nil variantionMap, which avoids allocating
an empty map if the module will never be split.
Context.addVariationDependencies constructs a variationMap to
compare against the variationMap of each variant, but constructed
an empty variationMap if no variations were specified. A nil
map is not the same as an empty map, so consistently use a nil
map and create it when populating the first entry.
Change-Id: I48b604659f9cdb23326b504a093cdfe5a3eb4f68
Use module groups instead of passing around the list of modules
extracted from a module group.
Test: blueprint tests
Change-Id: I02a79950c6377441c49129ebeb5f12be257df668
* aosp/upstream:
Move outputs of bootstrap modules in main stage to separate directory
Test: m checkbuild
Change-Id: I19de5b4acc6c4422fdc5177971de5bf6a755259a
Don't write to $buildDir/.bootstrap in the ninja file generated for
the main stage.
Test: examine main stage build.ninja file
Change-Id: I9c6183c9a434ff11d44cdd4f9844eae192ebfe03
* aosp/upstream:
Add proptools.FilterPropertyStruct
Make CreateModule return the newly created module
Add proptools.Int and proptools.IntDefault
Test: m checkbuild
Change-Id: I4bbd45be12794c1a8575799950772d4ecd272628
Move some code from Soong to support creating a property struct
at runtime by filtering fields out of another property struct.
Test: TestFilterPropertyStruct
Change-Id: Ic5ae390a885195bebad6f3ecb7c752c0582a60b1
Add proptools.Int and proptools.IntDefault that behave analogously
to proptools.String and proptools.StringDefault.
Change-Id: I41fd3417c973c9ff4a5aa6680546b4b893784745
* aosp/upstream:
Don't ignore local variations when creating reverse dep
Added VisitDirectDeps* methods to SingletonContext.
Test: m
Change-Id: I4832a523588c3095b077b89d2ecb4068b490fed4
This fixes a bug that reverse dependency can't be made for modules
having local variations. Previously, when module A having local variants
calls AddReverseDependency to module B having local variants, the match
is tested between the non-local variants of module A against all
variants of module B, which can never be successful.
This change fixes it by using all variants of module A when
findMatchingVariants is called for AddReverseDependency.
Test: m
Change-Id: Ib289188a5dd58c72bd6ba07e3c0f825f8b1c6b1b
A an example use case is generating the graph of module
dependencies, where modules are vertices and dependencies
are edges.
The patch was tested with a local implementation of such
a module in the Soong build system. The graph was generated
for all modules in the AOSP tree.
am: d52d9b65d7 -s ours
am skip reason: change_id I76dd2fa706c67da7973cbc500142f7f5c597a3cb with SHA1 47653a7b0b is in history
Change-Id: I5e0edbac4dfde919fe10dd26f0ebd0ea7ef8bfe9
am: ba1c448eaa -s ours
am skip reason: change_id I76dd2fa706c67da7973cbc500142f7f5c597a3cb with SHA1 47653a7b0b is in history
Change-Id: I68802948814099b8c9bc1b5b7b0d434ddc92cfda
am: eb03bacf3f -s ours
am skip reason: change_id I76dd2fa706c67da7973cbc500142f7f5c597a3cb with SHA1 47653a7b0b is in history
Change-Id: Ib7bcca8bcee122112b3a36795ad1246bd58a333c