Adjust the double loadable check

The check no longer tracks private dependencies like stubImplDepTag and
staticVariantTag. It also doesn't do the check for double_loadable
libraries that are not depended on by a LLNDK library.

Bug: N/A
Test: m
Test: add 'double_loadable: true, gen_trace: true` to an aidl_interface
module. The build doesn't break.

Change-Id: Iccd1a9d445a48d03c373708ba1bdd34b9a7f152d
This commit is contained in:
Jiyong Park
2021-01-14 14:26:06 +09:00
parent 66f7fdd1c8
commit 0474e1f677
2 changed files with 40 additions and 65 deletions

View File

@@ -2030,64 +2030,6 @@ func TestDoubleLoadableDepError(t *testing.T) {
}
`)
// Check whether an error is emitted when a double_loadable lib depends on a non-double_loadable vendor_available lib.
testCcError(t, "module \".*\" variant \".*\": link.* \".*\" which is not LL-NDK, VNDK-SP, .*double_loadable", `
cc_library {
name: "libdoubleloadable",
vendor_available: true,
double_loadable: true,
shared_libs: ["libnondoubleloadable"],
}
cc_library {
name: "libnondoubleloadable",
vendor_available: true,
}
`)
// Check whether an error is emitted when a double_loadable lib depends on a non-double_loadable VNDK lib.
testCcError(t, "module \".*\" variant \".*\": link.* \".*\" which is not LL-NDK, VNDK-SP, .*double_loadable", `
cc_library {
name: "libdoubleloadable",
vendor_available: true,
double_loadable: true,
shared_libs: ["libnondoubleloadable"],
}
cc_library {
name: "libnondoubleloadable",
vendor_available: true,
product_available: true,
vndk: {
enabled: true,
},
}
`)
// Check whether an error is emitted when a double_loadable VNDK depends on a non-double_loadable VNDK private lib.
testCcError(t, "module \".*\" variant \".*\": link.* \".*\" which is not LL-NDK, VNDK-SP, .*double_loadable", `
cc_library {
name: "libdoubleloadable",
vendor_available: true,
product_available: true,
vndk: {
enabled: true,
},
double_loadable: true,
shared_libs: ["libnondoubleloadable"],
}
cc_library {
name: "libnondoubleloadable",
vendor_available: true,
product_available: true,
vndk: {
enabled: true,
private: true,
},
}
`)
// Check whether an error is emitted when a LLNDK depends on a non-double_loadable indirectly.
testCcError(t, "module \".*\" variant \".*\": link.* \".*\" which is not LL-NDK, VNDK-SP, .*double_loadable", `
cc_library {
@@ -2112,6 +2054,29 @@ func TestDoubleLoadableDepError(t *testing.T) {
vendor_available: true,
}
`)
// The error is not from 'client' but from 'libllndk'
testCcError(t, "module \"libllndk\".* links a library \"libnondoubleloadable\".*double_loadable", `
cc_library {
name: "client",
vendor_available: true,
double_loadable: true,
shared_libs: ["libllndk"],
}
cc_library {
name: "libllndk",
shared_libs: ["libnondoubleloadable"],
llndk_stubs: "libllndk.llndk",
}
llndk_library {
name: "libllndk.llndk",
symbol_file: "",
}
cc_library {
name: "libnondoubleloadable",
vendor_available: true,
}
`)
}
func TestCheckVndkMembershipBeforeDoubleLoadable(t *testing.T) {