Make libsigchain a stub library.
Also fix a missing call in sigchain_test.cc
Bug: 142944043
Test: sigchain_test.cc
Change-Id: Ifc35cf087276c91cb61e2f77d5213283235808f2
diff --git a/sigchainlib/Android.bp b/sigchainlib/Android.bp
index 5783e9a..5baba87 100644
--- a/sigchainlib/Android.bp
+++ b/sigchainlib/Android.bp
@@ -28,19 +28,20 @@
name: "libsigchain",
defaults: ["art_defaults"],
visibility: [
- // TODO(b/142944043, b/133140750): Clean this up.
"//frameworks/base/cmds/app_process",
],
+ // Make libsigchain symbols global, so that an app library which
+ // is loaded in a classloader linker namespace looks for
+ // libsigchain symbols before libc.
+ // -z,global marks the binary with the DF_1_GLOBAL flag which puts the symbols
+ // in the global group. It does not affect their visibilities like the version
+ // script does.
+ ldflags: ["-Wl,-z,global"],
host_supported: true,
target: {
linux: {
- shared: {
- srcs: ["sigchain_fake.cc"],
- },
- static: {
- srcs: ["sigchain.cc"],
- },
+ srcs: ["sigchain.cc"],
},
darwin: {
@@ -56,10 +57,11 @@
apex_available: [
"com.android.art",
"com.android.art.debug",
- // TODO(b/142944043) Clean this up. This is due to the dependency from
- // app_process
- "//apex_available:platform",
],
+ stubs: {
+ symbol_file: "libsigchain.map.txt",
+ versions: ["1"],
+ },
}
// Create a fake version of libsigchain which expose the necessary symbols