Revert "Make libstatssocket a shared_lib"

This reverts commit 29512fbf70.

Reason for revert: breakage https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master&target=run_bluetooth_host_native_tests&lkgb=6474123&lkbb=6474183&fkbb=6474137

Bug: 156046846
Test: m on full-eng

Merged-In: I5889dd718536f5f2c693b4c2e7331c9cc2eb2ac9
Change-Id: If28b7590d4e58e44a24581f3b5891b2441504801
This commit is contained in:
Jiyong Park 2020-05-08 07:55:56 +00:00
parent 29512fbf70
commit 3e0ec0f7f7

View file

@ -17,8 +17,8 @@
// =========================================================================
// Native library to write stats log to statsd socket on Android R and later
// =========================================================================
cc_defaults {
name: "libstatssocket_defaults",
cc_library {
name: "libstatssocket",
srcs: [
"stats_buffer_writer.c",
"stats_event.c",
@ -27,10 +27,7 @@ cc_defaults {
"stats_event_list.c",
"statsd_writer.c",
],
export_include_dirs: ["include"],
static_libs: [
"libcutils", // does not expose a stable C API
],
host_supported: true,
cflags: [
"-Wall",
"-Werror",
@ -38,28 +35,11 @@ cc_defaults {
"-DWRITE_TO_STATSD=1",
"-DWRITE_TO_LOGD=0",
],
}
cc_library {
name: "libstatssocket",
defaults: [
"libstatssocket_defaults",
export_include_dirs: ["include"],
shared_libs: [
"libcutils",
"liblog",
],
host_supported: true,
target: {
// On android, libstatssocket should only be linked as a shared lib
android: {
static: {
enabled: false,
},
},
host: {
shared: {
enabled: false,
},
},
},
// enumerate stable entry points for APEX use
stubs: {
@ -67,23 +47,7 @@ cc_library {
versions: [
"1",
],
},
apex_available: [
"com.android.os.statsd",
"test_com.android.os.statsd",
],
}
//TODO (b/149842105): Figure out if there is a better solution for this.
cc_test_library {
name: "libstatssocket_private",
defaults: [
"libstatssocket_defaults",
],
visibility: [
"//frameworks/base/apex/statsd/tests/libstatspull",
"//frameworks/base/cmds/statsd",
],
}
}
cc_library_headers {
@ -105,7 +69,7 @@ cc_benchmark {
"-Werror",
],
static_libs: [
"libstatssocket_private",
"libstatssocket",
],
shared_libs: [
"libcutils",
@ -123,7 +87,7 @@ cc_test {
],
static_libs: [
"libgmock",
"libstatssocket_private",
"libstatssocket",
],
shared_libs: [
"libcutils",