platform_build_soong/android
Jiyong Park 6a43f04777 Squash vendor sources before linkageMutator runs
linkageMutator removes srcs property of the shared variant of a lib in
order to reuse *.o files compiled for the static variant also to the
shared variant.

However, this causes problem when vendor-specific srcs are specified in
target: {vendor: {srcs: ["..."]}}. For example, let's assume

cc_library {
    name: "libfoo",
    srcs: ["foo.c"],
    target: {
        vendor: {
            srcs: ["bar.c"],
        },
    },
}

Then,
static_vendor: inputs = foo.o, bar.o
shared_vendor: inputs = foo.o (from static_vendor), bar.o (from
static_vendor), bar.o

So, bar.o is included twice and this causes multiple symbol definition
error.

In order to handle the problem, vendor mutator is applied before the
linkage mutator and the vendor-specific srcs are squashed in the vendor
mutator.

Bug: 67731122
Test: build
Test: cc_test.go

Change-Id: I2a5390295dddfc41260e9b6f02746908cdf47228
2017-10-13 14:36:12 +09:00
..
androidmk.go Add hostdex support 2017-10-10 08:02:20 -07:00
api_levels.go Add a name to API level map for O. 2017-08-29 11:50:34 -07:00
arch.go Add target.linux for linux kernel based targets 2017-10-03 14:44:06 -07:00
config.go Squash vendor sources before linkageMutator runs 2017-10-13 14:36:12 +09:00
defaults.go Add support for java_defaults modules 2017-07-20 05:47:27 +00:00
defs.go Make binaries executable 2017-08-31 13:48:52 -07:00
env.go Revert "Revert "Ensure environment dependencies are correct"" 2017-05-15 15:22:45 -07: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
hooks.go Replace PropertyCustomizer with hooks 2016-09-13 17:37:32 -07:00
makevars.go Expose the minimum supported SDK version to make. 2017-08-17 16:54:03 -07:00
module.go Fix mixing genrule dependencies with globs 2017-10-09 15:35:47 -07:00
mutator.go Revert "Some clarifications in preparation to automatically order linker dependencies" 2017-10-04 21:07:42 +00:00
onceper.go Add DeviceConfig and OncePer objects 2016-08-17 16:39:06 -07:00
package_ctx.go Add error-prone support 2017-08-28 11:12:38 -07:00
paths.go Add java file resources and flag to include sources 2017-09-29 14:02:22 -07:00
paths_test.go Let tests override environment 2017-10-10 23:28:43 -07:00
prebuilt.go Rename java_prebuilt_library to java_import 2017-08-11 15:24:11 -07:00
prebuilt_test.go Let tests override environment 2017-10-10 23:28:43 -07:00
proto.go Add support for .proto files in java modules 2017-10-03 10:25:15 -07:00
register.go Add integration testing infrastructure 2017-07-14 14:19:51 -07:00
testing.go Add test infrastructure for running the arch mutator 2017-09-20 13:20:45 -07:00
util.go Allow integer_overflow sanitizer path exclusion. 2017-07-18 13:38:20 -07:00
variable.go Pass --min-sdk-version to dx 2017-08-31 13:48:52 -07:00
variable_test.go Support %s in product variable properties 2017-05-05 18:22:30 -07:00