Do not read 'vendor_available: false'
In case of VNDK, 'vendor_available: false' had a special meaning that defines VNDK-private libraries. It is not trivial because not defining a boolean property means 'false' normally. To avoid the confusion replace it with the 'vndk.private: true' for VNDK-private libraries and 'private: true' for LLNDK-private libraries. All VNDK libraries must define 'vendor_available: true' and may have 'vndk.private: true' if they are VNDK-private. With this change '(vendor|product)_available: false' is the same as not defining the property. LLNDK-private must define 'private: true' instead of 'vendor_available: false'. Bug: 175768895 Test: build Change-Id: I57fbca351be317257d95027f3cdcdbbe537eab23
This commit is contained in:
@@ -234,9 +234,6 @@ func checkVndkModule(t *testing.T, ctx *android.TestContext, name, subDir string
|
||||
t.Helper()
|
||||
|
||||
mod := ctx.ModuleForTests(name, variant).Module().(*Module)
|
||||
if !mod.HasVendorVariant() {
|
||||
t.Errorf("%q must have variant %q", name, variant)
|
||||
}
|
||||
|
||||
// Check library properties.
|
||||
lib, ok := mod.compiler.(*libraryDecorator)
|
||||
@@ -730,10 +727,11 @@ func TestVndkWhenVndkVersionIsNotSet(t *testing.T) {
|
||||
}
|
||||
cc_library {
|
||||
name: "libvndk-private",
|
||||
vendor_available: false,
|
||||
product_available: false,
|
||||
vendor_available: true,
|
||||
product_available: true,
|
||||
vndk: {
|
||||
enabled: true,
|
||||
private: true,
|
||||
},
|
||||
nocrt: true,
|
||||
}
|
||||
@@ -757,7 +755,7 @@ func TestVndkWhenVndkVersionIsNotSet(t *testing.T) {
|
||||
|
||||
func TestVndkModuleError(t *testing.T) {
|
||||
// Check the error message for vendor_available and product_available properties.
|
||||
testCcErrorProductVndk(t, "vndk: vendor_available must be set to either true or false when `vndk: {enabled: true}`", `
|
||||
testCcErrorProductVndk(t, "vndk: vendor_available must be set to true when `vndk: {enabled: true}`", `
|
||||
cc_library {
|
||||
name: "libvndk",
|
||||
vndk: {
|
||||
@@ -767,7 +765,7 @@ func TestVndkModuleError(t *testing.T) {
|
||||
}
|
||||
`)
|
||||
|
||||
testCcErrorProductVndk(t, "vndk: vendor_available must be set to either true or false when `vndk: {enabled: true}`", `
|
||||
testCcErrorProductVndk(t, "vndk: vendor_available must be set to true when `vndk: {enabled: true}`", `
|
||||
cc_library {
|
||||
name: "libvndk",
|
||||
product_available: true,
|
||||
@@ -3136,7 +3134,7 @@ func TestMakeLinkType(t *testing.T) {
|
||||
}
|
||||
llndk_library {
|
||||
name: "libllndkprivate.llndk",
|
||||
vendor_available: false,
|
||||
private: true,
|
||||
symbol_file: "",
|
||||
}`
|
||||
|
||||
|
Reference in New Issue
Block a user