Add llndk_stubs property

Prepare for making the relationship between an llndk_library stubs
module and the cc_library implementation module explicit by
adding an llndk_stubs property.  Each cc_library will be updated
to point to its llndk_library, and the llndk_library name will
be changed to make the .llndk suffix explicit.  Then the implicit
connection and suffix can be removed.

Bug: 170784825
Test: m checkbuild
Change-Id: I6b0482a3f286ec29b2e928551aa4317749f2b499
This commit is contained in:
Colin Cross
2020-10-13 18:43:54 -07:00
parent 34f0290582
commit 0477b42276
12 changed files with 91 additions and 30 deletions

View File

@@ -846,10 +846,11 @@ func TestDoubleLoadbleDep(t *testing.T) {
cc_library {
name: "libllndk",
shared_libs: ["libdoubleloadable"],
llndk_stubs: "libllndk.llndk",
}
llndk_library {
name: "libllndk",
name: "libllndk.llndk",
symbol_file: "",
}
@@ -867,10 +868,11 @@ func TestDoubleLoadbleDep(t *testing.T) {
cc_library {
name: "libllndk",
shared_libs: ["libvndksp"],
llndk_stubs: "libllndk.llndk",
}
llndk_library {
name: "libllndk",
name: "libllndk.llndk",
symbol_file: "",
}
@@ -924,10 +926,11 @@ func TestDoubleLoadbleDep(t *testing.T) {
cc_library {
name: "libllndk",
shared_libs: ["libcoreonly"],
llndk_stubs: "libllndk.llndk",
}
llndk_library {
name: "libllndk",
name: "libllndk.llndk",
symbol_file: "",
}
@@ -1523,10 +1526,11 @@ func TestDoubleLoadableDepError(t *testing.T) {
cc_library {
name: "libllndk",
shared_libs: ["libnondoubleloadable"],
llndk_stubs: "libllndk.llndk",
}
llndk_library {
name: "libllndk",
name: "libllndk.llndk",
symbol_file: "",
}
@@ -1545,10 +1549,11 @@ func TestDoubleLoadableDepError(t *testing.T) {
name: "libllndk",
no_libcrt: true,
shared_libs: ["libnondoubleloadable"],
llndk_stubs: "libllndk.llndk",
}
llndk_library {
name: "libllndk",
name: "libllndk.llndk",
symbol_file: "",
}
@@ -1617,10 +1622,11 @@ func TestDoubleLoadableDepError(t *testing.T) {
cc_library {
name: "libllndk",
shared_libs: ["libcoreonly"],
llndk_stubs: "libllndk.llndk",
}
llndk_library {
name: "libllndk",
name: "libllndk.llndk",
symbol_file: "",
}
@@ -2361,9 +2367,10 @@ func TestEnforceProductVndkVersion(t *testing.T) {
bp := `
cc_library {
name: "libllndk",
llndk_stubs: "libllndk.llndk",
}
llndk_library {
name: "libllndk",
name: "libllndk.llndk",
symbol_file: "",
}
cc_library {
@@ -2564,16 +2571,18 @@ func TestMakeLinkType(t *testing.T) {
}
cc_library {
name: "libllndk",
llndk_stubs: "libllndk.llndk",
}
llndk_library {
name: "libllndk",
name: "libllndk.llndk",
symbol_file: "",
}
cc_library {
name: "libllndkprivate",
llndk_stubs: "libllndkprivate.llndk",
}
llndk_library {
name: "libllndkprivate",
name: "libllndkprivate.llndk",
vendor_available: false,
symbol_file: "",
}`
@@ -2987,9 +2996,10 @@ func TestLlndkLibrary(t *testing.T) {
cc_library {
name: "libllndk",
stubs: { versions: ["1", "2"] },
llndk_stubs: "libllndk.llndk",
}
llndk_library {
name: "libllndk",
name: "libllndk.llndk",
}
`)
actual := ctx.ModuleVariantsForTests("libllndk.llndk")
@@ -3017,9 +3027,14 @@ func TestLlndkHeaders(t *testing.T) {
export_include_dirs: ["my_include"],
}
llndk_library {
name: "libllndk",
name: "libllndk.llndk",
export_llndk_headers: ["libllndk_headers"],
}
cc_library {
name: "libllndk",
llndk_stubs: "libllndk.llndk",
}
cc_library {
name: "libvendor",
shared_libs: ["libllndk"],