compat: libhidlbase: add shim for missing constructor map symbol
gBn/sConstructorMap symbols were removed from libhidl: - https://android.googlesource.com/platform/system/libhidl/+/e29b2ad However, some prebuilts still make use of them. In some cases, for example when using GSI, libhidl can not be patched directly, which requires modifying affected blobs to depend on this shim library. Change-Id: I097c75ac210a9c3f50a9725da0b910d819c85b9a Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
This commit is contained in:
parent
e8f0e4b7a0
commit
25a12c76a8
2 changed files with 23 additions and 0 deletions
|
@ -322,6 +322,14 @@ cc_library {
|
|||
vendor: true,
|
||||
}
|
||||
|
||||
cc_library {
|
||||
name: "libhidlbase_shim",
|
||||
srcs: ["libhidlbase/gBnsConstructorMap.cpp"],
|
||||
shared_libs: ["libhidlbase"],
|
||||
compile_multilib: "both",
|
||||
vendor: true,
|
||||
}
|
||||
|
||||
cc_library {
|
||||
name: "libmemset_shim",
|
||||
target: {
|
||||
|
|
15
libhidlbase/gBnsConstructorMap.cpp
Normal file
15
libhidlbase/gBnsConstructorMap.cpp
Normal file
|
@ -0,0 +1,15 @@
|
|||
#include <hidl/Static.h>
|
||||
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace details {
|
||||
|
||||
// Deprecated; kept for ABI compatibility. Use getBnConstructorMap.
|
||||
DoNotDestruct<BnConstructorMap> gBnConstructorMap{};
|
||||
|
||||
// Deprecated; kept for ABI compatibility. Use getBsConstructorMap.
|
||||
DoNotDestruct<BsConstructorMap> gBsConstructorMap{};
|
||||
|
||||
} // namespace details
|
||||
} // namespace hardware
|
||||
} // namespace android
|
Loading…
Reference in a new issue