[DO NOT MERGE] Revert "Make libstatssocket a shared_lib"

This reverts commit 29512fbf70.

Specifically, we're reverting
https://googleplex-android-review.git.corp.google.com/c/platform/system/core/+/11419425/-1..1

Test: Local 'm -j71 out/soong/.intermediates/frameworks/base/tools/stats_log_api_gen/libstatslog/android_arm64_armv8-a_shared_com.android.bluetooth.updatable/unstripped/libstatslog.so'
Bug: 156091657
Change-Id: I79b4206beaa162078c76f9323a061923ec6ca0c6
This commit is contained in:
Greg Kaiser 2020-05-08 16:23:54 -07:00
parent 3a52bfc30d
commit 168940f51a
1 changed files with 10 additions and 46 deletions

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",