aboutsummaryrefslogtreecommitdiffstats
path: root/Android.bp
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2017-04-06 12:43:22 -0700
committerDan Willemsen <dwillemsen@google.com>2017-04-11 12:27:41 -0700
commit4416e5db6931629995fcd35c90b295c285be50c8 (patch)
tree556a7a5685f20e311c0b23480423fa67624209af /Android.bp
parent01a90597bcab97c4dace82a13a32da76875883cb (diff)
downloadbuild_soong-4416e5db6931629995fcd35c90b295c285be50c8.tar.gz
build_soong-4416e5db6931629995fcd35c90b295c285be50c8.tar.bz2
build_soong-4416e5db6931629995fcd35c90b295c285be50c8.zip
Split /system and /vendor modules, allow multi-installation
Nothing changes if BOARD_VNDK_VERSION isn't set. When the VNDK is enabled (BOARD_VNDK_VERSION in Make), this will split /system and /vendor modules into two different variant spaces that can't link to each other. There are a few interfaces between the two variant spaces: The `llndk_library` stubs will be available in the /vendor variant, but won't be installed, so at runtime the /system variant will be used. Setting `vendor_available: true` will split a module into both variants. The /system (or "core") variant will compile just like today. The /vendor ("vendor") variant will compile against everything else in the vendor space (so LL-NDK instead of libc/liblog/etc). There will be two copies of these libraries installed onto the final device. Since the available runtime interfaces for vendor modules may be reduced, and your dependencies may not expose their private interfaces, we allow the vendor variants to reduce their compilation set, and export a different set of headers: cc_library { name: "libfoo", srcs: ["common.cpp", "private_impl.cpp"], export_include_dirs: ["include"], target: { vendor: { export_include_dirs: ["include_vndk"], exclude_srcs: ["private_impl.cpp"], srcs: ["vendor_only.cpp"], }, }, } So the "core" variant would compile with both "common.cpp" and "private_impl.cpp", and export "include". The "vendor" variant would compile "common.cpp" and "vendor_only.cpp", and export "include_vndk". Bug: 36426473 Bug: 36079834 Test: out/soong/build.ninja, out/soong/Android- only changes due to _core addition and .llndk -> .vendor Test: attempt to compile with BOARD_VNDK_VERSION:=current Change-Id: Idef28764043bf6c33dc0d2e7e2026c38867ff769
Diffstat (limited to 'Android.bp')
-rw-r--r--Android.bp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index 0e3ac02f..2ae993f7 100644
--- a/Android.bp
+++ b/Android.bp
@@ -232,6 +232,7 @@ cc_defaults {
toolchain_library {
name: "libatomic",
defaults: ["linux_bionic_supported"],
+ vendor_available: true,
arch: {
arm: {
instruction_set: "arm",
@@ -242,6 +243,7 @@ toolchain_library {
toolchain_library {
name: "libgcc",
defaults: ["linux_bionic_supported"],
+ vendor_available: true,
arch: {
arm: {
instruction_set: "arm",