platform_build_soong/cc
Jiyong Park 25fc6a9cc9 Stubs variant is used when building for APEX
When a native module is built for an APEX and is depending on a native
library having stubs (i.e. stubs.versions property is set), the stubs
variant is used unless the dependent lib is directly included in the
same APEX with the depending module.

Example:

apex {
    name: "myapex",
    native_shared_libs: ["libX", "libY"],
}

cc_library {
    name: "libX",
    shared_libs: ["libY", "libZ"],
}

cc_library {
    name: "libY",
    stubs: { versions: ["1", "2"], },
}

cc_library {
    name: "libZ",
    stubs: { versions: ["1", "2"], },
}

In this case, libX is linking to the impl variant of libY (that provides
private APIs) while libY is linking to the version 2 stubs of libZ. This is
because libY is directly included in the same apex via
native_shared_libs property, but libZ isn't.

Bug: 112672359
Test: apex_test added
Change-Id: If9871b70dc74a06bd828dd4cd1aeebd2e68b837c
2018-12-04 17:46:22 +09:00
..
config Merge "Do not generate SHT_RELR relocations before API 28" 2018-12-03 18:40:59 +00:00
libbuildversion Add dist support to Soong 2018-11-19 15:26:14 -08:00
androidmk.go Add dist support to Soong 2018-11-19 15:26:14 -08:00
binary.go Add dist support to Soong 2018-11-19 15:26:14 -08:00
builder.go Add nanopb-c support 2018-11-17 15:28:25 -08:00
cc.go Stubs variant is used when building for APEX 2018-12-04 17:46:22 +09:00
cc_test.go Stubs variant is used when building for APEX 2018-12-04 17:46:22 +09:00
check.go Allow macro definition with space 2017-10-19 22:39:32 +09:00
cmakelists.go Remove GCC checks 2018-10-09 02:16:58 +00:00
compdb.go Use the real compiler for compdb 2018-11-07 11:35:47 -08:00
compiler.go Remove legacy NDK code. 2018-11-27 13:58:18 -08:00
coverage.go Revert "Support coverage instrumentation for Linux host" 2018-04-23 22:44:39 +00:00
gen.go Add nanopb-c support 2018-11-17 15:28:25 -08:00
gen_stub_libs.py Better error message for multiple defined symbols. 2018-10-11 13:50:49 -07:00
gen_test.go Fix using aidl files from filegroups 2017-11-17 11:22:08 -08:00
genrule.go Add support for versioned stubs. 2018-10-30 09:55:48 +09:00
genrule_test.go Allow cc_genrule srcs to vary by architecture 2018-10-23 18:40:37 +00:00
installer.go Change bool, and string properties to *bool, and *string for cc 2017-11-07 15:57:16 -08:00
kernel_headers.go Fix double space in include argument 2018-10-02 11:16:56 -07:00
library.go Stubs variant is used when building for APEX 2018-12-04 17:46:22 +09:00
library_test.go Add cc_library tests 2017-11-17 11:22:04 -08:00
linker.go Apply system_shared_libs to static libraries 2018-12-03 15:38:39 -08:00
llndk_library.go Fix double space in include argument 2018-10-02 11:16:56 -07:00
lto.go Stop passing the gold plugin path to llvm-ar. 2018-11-08 20:13:16 -08:00
makevars.go Allow generating modules once per OS instead of once per Class 2018-10-22 15:46:03 -07:00
ndk_headers.go Allow NDK APIs to be marked as drafts. 2018-11-28 09:52:12 -08:00
ndk_library.go Allow NDK APIs to be marked as drafts. 2018-11-28 09:52:12 -08:00
ndk_prebuilt.go Fix double space in include argument 2018-10-02 11:16:56 -07:00
ndk_sysroot.go Allow NDK APIs to be marked as drafts. 2018-11-28 09:52:12 -08:00
object.go Enable safe ICF with LLD. 2018-10-25 13:40:28 -07:00
pgo.go Take Enable_profile_use into account when checking if PGO is enabled 2018-05-07 15:16:36 -07:00
prebuilt.go Use soong_cc_prebuilt.mk instead of prebuilt.mk for Soong cc modules 2018-09-10 23:12:12 -07:00
proto.go Add nanopb-c support 2018-11-17 15:28:25 -08:00
pylintrc Don't warn for TODOish comments. 2016-08-01 14:36:22 -07:00
rs.go Use prebuilt llvm-rs-cc for unbundled build 2018-11-18 20:58:10 -08:00
sabi.go Remove flags from ClangLibToolingUnknownCflags 2018-10-16 17:52:12 +08:00
sanitize.go Add sanitizer runtime library to recovery when needed. 2018-11-29 23:22:20 +00:00
stl.go Use libucrt instead of libmsvcr110 2018-11-30 21:42:33 +00:00
strip.go Use soong_cc_prebuilt.mk instead of prebuilt.mk for Soong cc modules 2018-09-10 23:12:12 -07:00
test.go Enable benchmarks on darwin 2018-11-13 15:28:07 -08:00
test_data_test.go Fix `go vet` issues 2018-07-22 21:18:45 -07:00
test_gen_stub_libs.py Better error message for multiple defined symbols. 2018-10-11 13:50:49 -07:00
tidy.go Remove GCC checks 2018-10-09 02:16:58 +00:00
toolchain_library.go Remove GCC checks 2018-10-09 02:16:58 +00:00
util.go Add nanopb-c support 2018-11-17 15:28:25 -08:00
util_test.go Allow cc_prebuilt version suffix to include `svn` 2018-09-26 10:59:56 +08:00
vendor_public_library.go Allow platform modules to link to vendor public libraries 2018-03-30 12:59:06 +09:00
vndk.go Improve messages for VNDK dependency errors. 2018-10-16 10:38:57 +01:00
vndk_prebuilt.go Use soong_cc_prebuilt.mk instead of prebuilt.mk for Soong cc modules 2018-09-10 23:12:12 -07:00
xom.go Disable AArch64 XOM when not using lld. 2018-11-28 09:17:26 -08:00