aboutsummaryrefslogtreecommitdiffstats
path: root/apex/apex_test.go
diff options
context:
space:
mode:
authorJiyong Park <jiyong@google.com>2018-12-07 22:42:47 +0900
committerJiyong Park <jiyong@google.com>2018-12-10 13:33:41 +0900
commit28d395a149a62d237365ab8e059bf24e83e585b6 (patch)
treee2afd9ec792f4b1498cf3211d35d415d689852fd /apex/apex_test.go
parent02c0ad48ba8f56a07bb9d3562e1631c9fbb60e01 (diff)
downloadandroid_build_soong-28d395a149a62d237365ab8e059bf24e83e585b6.tar.gz
android_build_soong-28d395a149a62d237365ab8e059bf24e83e585b6.tar.bz2
android_build_soong-28d395a149a62d237365ab8e059bf24e83e585b6.zip
Fix: build error when a lib with stubs is included in an APEX
apex { name: "foo", native_shared_libs: ["mylib"] } cc_library { name: "mylib", shared_libs: ["other_lib"], stubs: { versions: ["1"]}, } This is causing build error due to missing variant for other_lib. This is happening because the stubs variant of mylib is added to apex foo instead of the non-stubs variant. Because stubs variant does not have any further dependencies, other_lib is not included to the APEX and is not built for it. Fixing this issue by specifying the version variant when adding a lib to the dependency of an APEX, so that non-stub variant of the lib is depended on. Test: m (apex_test updated) Change-Id: I972b6dcbce11942f83a76212715ba915534ec3df
Diffstat (limited to 'apex/apex_test.go')
-rw-r--r--apex/apex_test.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go
index c7ef58ef..c01c40a7 100644
--- a/apex/apex_test.go
+++ b/apex/apex_test.go
@@ -276,13 +276,21 @@ func TestApexWithStubs(t *testing.T) {
cc_library {
name: "mylib3",
- srcs: ["mylib.cpp"],
- system_shared_libs: [],
+ srcs: ["mylib.cpp"],
+ shared_libs: ["mylib4"],
+ system_shared_libs: [],
stl: "none",
stubs: {
versions: ["10", "11", "12"],
},
}
+
+ cc_library {
+ name: "mylib4",
+ srcs: ["mylib.cpp"],
+ system_shared_libs: [],
+ stl: "none",
+ }
`)
apexRule := ctx.ModuleForTests("myapex", "android_common_myapex").Rule("apexRule")