blob: 94c405dea4745129c53faa5cb6e6f01c59ceb269 [file] [log] [blame]
Muhammad Qureshia3dcefc2019-12-02 20:27:46 -08001//
2// Copyright (C) 2018 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17// =========================================================================
18// Native library to write stats log to statsd socket on Android R and later
19// =========================================================================
20cc_library {
21 name: "libstatssocket",
22 srcs: [
Muhammad Qureshi962cc232019-11-06 15:15:23 -080023 "stats_buffer_writer.c",
Muhammad Qureshia3dcefc2019-12-02 20:27:46 -080024 "stats_event.c",
Muhammad Qureshi962cc232019-11-06 15:15:23 -080025 // TODO(b/145573568): Remove stats_event_list once stats_event
26 // migration is complete.
Muhammad Qureshia3dcefc2019-12-02 20:27:46 -080027 "stats_event_list.c",
28 "statsd_writer.c",
29 ],
30 host_supported: true,
31 cflags: [
32 "-Wall",
33 "-Werror",
34 "-DLIBLOG_LOG_TAG=1006",
35 "-DWRITE_TO_STATSD=1",
36 "-DWRITE_TO_LOGD=0",
37 ],
38 export_include_dirs: ["include"],
39 shared_libs: [
40 "libcutils",
41 "liblog",
42 ],
43}
Ruchir Rastogi926fa882019-12-10 18:46:23 -080044
45cc_library_headers {
46 name: "libstatssocket_headers",
47 export_include_dirs: ["include"],
48 host_supported: true,
49}
Ruchir Rastogi79dd3ea2019-12-12 17:16:59 -080050
51cc_benchmark {
52 name: "libstatssocket_benchmark",
53 srcs: [
54 "benchmark/main.cpp",
55 "benchmark/stats_event_benchmark.cpp",
56 ],
57 cflags: [
58 "-Wall",
59 "-Werror",
60 ],
61 static_libs: [
62 "libstatssocket",
63 ],
64 shared_libs: [
65 "libcutils",
66 "liblog",
67 "libgtest_prod",
68 ],
69}