diff options
| author | 2020-02-12 07:53:12 +0900 | |
|---|---|---|
| committer | 2020-02-12 17:01:26 +0900 | |
| commit | f760cae41b61fb65835b106aa29519be42e5041b (patch) | |
| tree | be55ef097dc6a48891695d4804e0b2a9ff55de75 /python/tests/py-cmd_test.py | |
| parent | ab872e0295fd3a9a5a5ae1b252b354aff14344d2 (diff) | |
apexDepsMutator is a top-down mutator
apex { name: ["myapex"], native_shared_libs: ["libX", "libY"] }
cc_library { name: "libX", shared_libs: ["libY"] }
cc_library { name: "libY", shared_libs: ["libZ"], stubs: {...} }
apexDepsMutator was a bottom up mutator and it uses WalkDeps to traverse
the dependency tree rooted at myapex in a depth-first order. While
traversing the tree, if calls BuildForApex for a module that will be
part of the APEX.
libY is visited twice. Once via libX and once via myapex. If the visit
from libX was before the visit from myapex (since this is a depth-first
traversing), BuildForApex is not called for libY and its dependency
libZ, because libY provides a stub. And then when libY is again visited
via myapex, BuildForApex is correctly called for the module, but not for
its dependencies libZ because the paths from libY to libZ was already
visited.
As a result, the apex variant of libY has a dependency to the non-apex
variant of libZ.
Fixing the problem by changing the mutator a top-down one.
Bug: 148645937
Test: m
Change-Id: Ib2cb28852087c63a568b3fd036504e9261cf0782
Diffstat (limited to 'python/tests/py-cmd_test.py')
0 files changed, 0 insertions, 0 deletions