platform_build_soong/apex
Jiyong Park f760cae41b 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
2020-02-12 17:01:26 +09:00
..
androidmk.go Use module name as the suffix for apex variant 2020-02-06 10:54:30 +09:00
apex.go apexDepsMutator is a top-down mutator 2020-02-12 17:01:26 +09:00
apex_test.go Update apex dependency even for test and non-installable APEXes 2020-02-12 07:45:16 +09:00
builder.go <apexname>-installed-file.txt shows symlinks 2020-02-08 17:18:03 +09:00
key.go Introduce module type 'sdk' 2019-09-22 08:21:27 +09:00
OWNERS Expand Jiyong's apex OWNERship 2019-01-31 18:57:00 +00:00
prebuilt.go Add compat symlinks for prebuilt_apex 2020-01-08 01:57:58 +09:00
TEST_MAPPING Add TEST_MAPPING for build/soong/apex 2019-08-07 17:33:24 +09:00
vndk.go Add compat symlinks for prebuilt_apex 2020-01-08 01:57:58 +09:00
vndk_test.go Add native_coverage to product variables 2020-01-27 16:09:57 -08:00