0ddfcd1188
This change fixes a problem that APEX variations are created for the modules that actually shouldn't built for any APEX. For example, consider this case. apex { name: "myapex", native_shared_libs: ["mylib"],} cc_library { name: "mylib", shared_libs: ["libfoo#10"],} cc_library { name: "libfoo", shared_libs: ["libbar"], stubs: { versions: ["10"], }, } cc_library { name: "libbar", ...} Before this change, both the stubs and non-stubs variations of libfoo were mutated with apexMuator, which is incorrect for the non-stubs varia; there is no dependency chain from the apex "myapex" to the non-stubs variation, but to the stubs variation due to the #10 syntax. This was happening becauses we used the name of the module to determine whether it should be built for APEX or not. Both stubs and non-stubs variations have the same module name "libfoo". Fixing this issue by recording the list of APEX variations required directly on the module. So, the stubs variation of libfoo has myapex in its apex variations list, but the non-stubs variation doesn't, and thus apexMutator does not pick up the non-stubs variation. Test: m (apex_test updated and passing) Test: cherry-pick ag/5747464 and m Change-Id: I31e618626809a828a55fff513ef5f81f79637afa |
||
---|---|---|
.. | ||
androidmk.go | ||
apex.go | ||
api_levels.go | ||
arch.go | ||
config.go | ||
config_test.go | ||
defaults.go | ||
defs.go | ||
env.go | ||
expand.go | ||
expand_test.go | ||
filegroup.go | ||
hooks.go | ||
makevars.go | ||
module.go | ||
mutator.go | ||
namespace.go | ||
namespace_test.go | ||
neverallow.go | ||
neverallow_test.go | ||
onceper.go | ||
package_ctx.go | ||
paths.go | ||
paths_test.go | ||
prebuilt.go | ||
prebuilt_etc.go | ||
prebuilt_etc_test.go | ||
prebuilt_test.go | ||
proto.go | ||
register.go | ||
singleton.go | ||
testing.go | ||
util.go | ||
util_test.go | ||
variable.go | ||
variable_test.go | ||
writedocs.go |