diff options
author | Jiyong Park | 2018-11-18 03:02:45 -0600 |
---|---|---|
committer | Jiyong Park | 2018-12-04 02:46:22 -0600 |
commit | 25fc6a9cc9b665882f6a422462cbc5d0670af87c (patch) | |
tree | 3912fdf1ef4fac03019dd909f12849130f41ea01 /Android.bp | |
parent | 2098eb8c2ab0313855c3715369658fee9b6e4383 (diff) | |
download | platform-build-soong-25fc6a9cc9b665882f6a422462cbc5d0670af87c.tar.gz platform-build-soong-25fc6a9cc9b665882f6a422462cbc5d0670af87c.tar.xz platform-build-soong-25fc6a9cc9b665882f6a422462cbc5d0670af87c.zip |
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
Diffstat (limited to 'Android.bp')
-rw-r--r-- | Android.bp | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -353,6 +353,9 @@ bootstrap_go_package { | |||
353 | "apex/apex.go", | 353 | "apex/apex.go", |
354 | "apex/key.go", | 354 | "apex/key.go", |
355 | ], | 355 | ], |
356 | testSrcs: [ | ||
357 | "apex/apex_test.go", | ||
358 | ], | ||
356 | pluginFor: ["soong_build"], | 359 | pluginFor: ["soong_build"], |
357 | } | 360 | } |
358 | 361 | ||