platform_build_soong/android
Jiyong Park 0ddfcd1188 Don't create unnecessary APEX variations
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
2018-12-13 10:48:15 +09:00
..
androidmk.go Add filegroup support to notice property. 2018-11-27 09:45:18 -08:00
apex.go Don't create unnecessary APEX variations 2018-12-13 10:48:15 +09:00
api_levels.go Stop versioning NDK stubs pre-M. 2018-07-24 22:52:57 +00:00
arch.go Remove denver from soong 2018-12-04 19:39:48 -08:00
config.go Use debug mode when running R8 for eng builds. 2018-11-30 15:23:16 +00:00
config_test.go Fix go vet issues 2018-07-22 21:18:45 -07:00
defaults.go Update soong for blueprint change to allow multiple deps 2018-06-20 22:56:36 +00:00
defs.go Make binaries executable 2017-08-31 13:48:52 -07:00
env.go Make *Context.Config return a Config instead of a interface{} 2017-11-30 00:44:11 +00:00
expand.go genrule: expand $$ to $$ 2016-11-22 15:41:08 -08:00
expand_test.go genrule: expand $$ to $$ 2016-11-22 15:41:08 -08:00
filegroup.go Fix few issues with filegroups 2018-04-18 18:56:33 +00:00
hooks.go Replace ModuleContext.AConfig() with Config() 2017-11-30 00:44:18 +00:00
makevars.go Fix go vet issues 2018-07-22 21:18:45 -07:00
module.go Add filegroup support to notice property. 2018-11-27 09:45:18 -08:00
mutator.go Add filegroup support to notice property. 2018-11-27 09:45:18 -08:00
namespace.go Fix go vet issues 2018-07-22 21:18:45 -07:00
namespace_test.go Fix module rename inside namespace 2018-04-16 16:06:53 -07:00
neverallow.go Add soong build restrictions for libcore targets 2018-10-25 18:10:57 +01:00
neverallow_test.go Add soong build restrictions for libcore targets 2018-10-25 18:10:57 +01:00
onceper.go Add OncePer.Get() 2017-11-07 13:36:44 -08:00
package_ctx.go Allow '$' in some paths 2018-09-13 18:27:50 +00:00
paths.go Stop using DIST_DIR in Soong 2018-10-20 21:33:41 -07:00
paths_test.go s/product-services/product_services/g 2018-08-20 17:46:57 +00:00
prebuilt.go Fix few issues with filegroups 2018-04-18 18:56:33 +00:00
prebuilt_etc.go Add filename_from_src property to prebuilt_etc 2018-11-13 12:43:34 +09:00
prebuilt_etc_test.go Add filename_from_src property to prebuilt_etc 2018-11-13 12:43:34 +09:00
prebuilt_test.go Fix few issues with filegroups 2018-04-18 18:56:33 +00:00
proto.go Add proto.canonical_path_from_root 2018-02-22 16:48:35 -08:00
register.go Convert a missed Singleton 2017-11-30 00:42:49 +00:00
singleton.go Add phony targets for go binary modules 2018-09-28 10:25:45 -07:00
testing.go Don't create non-primary arch variant for recovery-only module 2018-07-12 10:49:30 +09:00
util.go RemoveFromList() should remove all matches 2018-03-16 17:45:34 +08:00
util_test.go RemoveFromList() should remove all matches 2018-03-16 17:45:34 +08:00
variable.go Remove obsolete flag 2018-11-29 10:08:14 +00:00
variable_test.go Support %s in product variable properties 2017-05-05 18:22:30 -07:00
writedocs.go Allow Soong to generate its own build documentation 2017-12-12 11:12:32 -08:00