Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 1 | // |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 2 | // Copyright (C) 2017 The Android Open Source Project |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 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 | // Build the library for use on the host |
| 19 | // ========================================================== |
| 20 | cc_library_host_shared { |
| 21 | name: "libstats_proto_host", |
| 22 | srcs: [ |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 23 | "src/atoms.proto", |
Yao Chen | 9c1debe | 2018-02-19 14:39:19 -0800 | [diff] [blame] | 24 | "src/atom_field_options.proto", |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 25 | ], |
| 26 | |
| 27 | shared_libs: [ |
| 28 | "libplatformprotos", |
| 29 | ], |
| 30 | |
| 31 | proto: { |
| 32 | type: "full", |
| 33 | export_proto_headers: true, |
Yao Chen | 9c1debe | 2018-02-19 14:39:19 -0800 | [diff] [blame] | 34 | include_dirs: [ |
| 35 | "external/protobuf/src", |
| 36 | ], |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 37 | }, |
Joe Onorato | 62c220b | 2017-11-18 20:32:56 -0800 | [diff] [blame] | 38 | |
| 39 | export_shared_lib_headers: [ |
| 40 | "libplatformprotos", |
| 41 | ] |
| 42 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 43 | } |
| 44 | |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 45 | cc_defaults { |
| 46 | name: "statsd_defaults", |
| 47 | aidl: { |
| 48 | include_dirs: ["frameworks/base/core/java"], |
| 49 | }, |
| 50 | |
| 51 | srcs: [ |
| 52 | ":statsd_aidl", |
Chenjie Yu | c7939cb | 2019-02-04 17:25:45 -0800 | [diff] [blame] | 53 | "src/active_config_list.proto", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 54 | "src/anomaly/AlarmMonitor.cpp", |
| 55 | "src/anomaly/AlarmTracker.cpp", |
| 56 | "src/anomaly/AnomalyTracker.cpp", |
| 57 | "src/anomaly/DurationAnomalyTracker.cpp", |
| 58 | "src/anomaly/subscriber_util.cpp", |
| 59 | "src/condition/CombinationConditionTracker.cpp", |
| 60 | "src/condition/condition_util.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 61 | "src/condition/ConditionWizard.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 62 | "src/condition/SimpleConditionTracker.cpp", |
tsaichristine | c46fbf9 | 2019-09-04 15:47:57 -0700 | [diff] [blame] | 63 | "src/condition/StateConditionTracker.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 64 | "src/config/ConfigKey.cpp", |
| 65 | "src/config/ConfigListener.cpp", |
| 66 | "src/config/ConfigManager.cpp", |
Yiwei Zhang | 7e63303 | 2019-03-01 17:25:27 -0800 | [diff] [blame] | 67 | "src/external/GpuStatsPuller.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 68 | "src/external/Perfetto.cpp", |
Tej Singh | 6a5c943 | 2019-10-11 11:07:06 -0700 | [diff] [blame] | 69 | "src/external/PullResultReceiver.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 70 | "src/external/puller_util.cpp", |
Tej Singh | a0c89dd | 2019-01-25 16:39:18 -0800 | [diff] [blame] | 71 | "src/external/StatsCallbackPuller.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 72 | "src/external/StatsPuller.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 73 | "src/external/StatsPullerManager.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 74 | "src/external/TrainInfoPuller.cpp", |
| 75 | "src/FieldValue.cpp", |
| 76 | "src/guardrail/StatsdStats.cpp", |
| 77 | "src/hash.cpp", |
| 78 | "src/HashableDimensionKey.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 79 | "src/logd/LogEvent.cpp", |
Yao Chen | 0f86186 | 2019-03-27 11:51:15 -0700 | [diff] [blame] | 80 | "src/logd/LogEventQueue.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 81 | "src/matchers/CombinationLogMatchingTracker.cpp", |
| 82 | "src/matchers/EventMatcherWizard.cpp", |
| 83 | "src/matchers/matcher_util.cpp", |
| 84 | "src/matchers/SimpleLogMatchingTracker.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 85 | "src/metrics/CountMetricProducer.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 86 | "src/metrics/duration_helper/MaxDurationTracker.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 87 | "src/metrics/duration_helper/OringDurationTracker.cpp", |
| 88 | "src/metrics/DurationMetricProducer.cpp", |
| 89 | "src/metrics/EventMetricProducer.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 90 | "src/metrics/GaugeMetricProducer.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 91 | "src/metrics/MetricProducer.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 92 | "src/metrics/metrics_manager_util.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 93 | "src/metrics/MetricsManager.cpp", |
| 94 | "src/metrics/ValueMetricProducer.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 95 | "src/packages/UidMap.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 96 | "src/shell/shell_config.proto", |
| 97 | "src/shell/ShellSubscriber.cpp", |
| 98 | "src/socket/StatsSocketListener.cpp", |
tsaichristine | 1097864 | 2019-09-10 14:12:49 -0700 | [diff] [blame] | 99 | "src/state/StateManager.cpp", |
| 100 | "src/state/StateTracker.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 101 | "src/stats_log_util.cpp", |
| 102 | "src/statscompanion_util.cpp", |
| 103 | "src/statsd_config.proto", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 104 | "src/StatsLogProcessor.cpp", |
| 105 | "src/StatsService.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 106 | "src/storage/StorageManager.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 107 | "src/subscriber/IncidentdReporter.cpp", |
| 108 | "src/subscriber/SubscriberReporter.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 109 | "src/uid_data.proto", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 110 | ], |
| 111 | |
Ruchir Rastogi | 1fb525e | 2019-11-07 14:08:24 -0800 | [diff] [blame] | 112 | cflags: [ |
Muhammad Qureshi | af77b79 | 2020-01-17 11:28:45 -0800 | [diff] [blame] | 113 | "-DNEW_ENCODING_SCHEME", |
Ruchir Rastogi | 1fb525e | 2019-11-07 14:08:24 -0800 | [diff] [blame] | 114 | ], |
| 115 | |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 116 | local_include_dirs: [ |
| 117 | "src", |
| 118 | ], |
| 119 | |
| 120 | static_libs: [ |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 121 | "android.frameworks.stats@1.0", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 122 | "libbase", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 123 | "libcutils", |
Jonathan Nguyen | 8896f8d | 2019-12-20 15:10:13 -0800 | [diff] [blame] | 124 | "liblog", |
Jonathan Nguyen | 8896f8d | 2019-12-20 15:10:13 -0800 | [diff] [blame] | 125 | "libprotoutil", |
| 126 | "libstatslog", |
| 127 | "libstatssocket", |
| 128 | "libsysutils", |
| 129 | ], |
| 130 | shared_libs: [ |
Jonathan Nguyen | 8896f8d | 2019-12-20 15:10:13 -0800 | [diff] [blame] | 131 | "libbinder", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 132 | "libgraphicsenv", |
| 133 | "libhidlbase", |
| 134 | "libincident", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 135 | "libservices", |
Muhammad Qureshi | c8e2266 | 2019-11-20 17:18:03 -0800 | [diff] [blame] | 136 | "libstatsmetadata", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 137 | "libutils", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 138 | ], |
| 139 | } |
| 140 | |
Muhammad Qureshi | c8e2266 | 2019-11-20 17:18:03 -0800 | [diff] [blame] | 141 | // ================ |
| 142 | // libstatsmetadata |
| 143 | // ================ |
| 144 | |
| 145 | genrule { |
| 146 | name: "atoms_info.h", |
| 147 | tools: ["stats-log-api-gen"], |
| 148 | cmd: "$(location stats-log-api-gen) --atomsInfoHeader $(genDir)/atoms_info.h", |
| 149 | out: [ |
| 150 | "atoms_info.h", |
| 151 | ], |
| 152 | } |
| 153 | |
| 154 | genrule { |
| 155 | name: "atoms_info.cpp", |
| 156 | tools: ["stats-log-api-gen"], |
| 157 | cmd: "$(location stats-log-api-gen) --atomsInfoCpp $(genDir)/atoms_info.cpp", |
| 158 | out: [ |
| 159 | "atoms_info.cpp", |
| 160 | ], |
| 161 | } |
| 162 | |
| 163 | cc_library_shared { |
| 164 | name: "libstatsmetadata", |
| 165 | host_supported: true, |
| 166 | generated_sources: [ |
| 167 | "atoms_info.cpp", |
| 168 | ], |
| 169 | generated_headers: [ |
| 170 | "atoms_info.h", |
| 171 | ], |
| 172 | cflags: [ |
| 173 | "-Wall", |
| 174 | "-Werror", |
| 175 | ], |
| 176 | export_generated_headers: [ |
| 177 | "atoms_info.h", |
| 178 | ], |
| 179 | shared_libs: [ |
| 180 | "libcutils", |
| 181 | "libstatslog", |
| 182 | ], |
Muhammad Qureshi | c8e2266 | 2019-11-20 17:18:03 -0800 | [diff] [blame] | 183 | } |
| 184 | |
| 185 | |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 186 | // ========= |
| 187 | // statsd |
| 188 | // ========= |
| 189 | |
| 190 | cc_binary { |
| 191 | name: "statsd", |
| 192 | defaults: ["statsd_defaults"], |
| 193 | |
| 194 | srcs: ["src/main.cpp"], |
| 195 | |
| 196 | cflags: [ |
| 197 | "-Wall", |
| 198 | "-Wextra", |
| 199 | "-Werror", |
| 200 | "-Wno-unused-parameter", |
| 201 | // optimize for size (protobuf glop can get big) |
| 202 | "-Os", |
| 203 | // "-g", |
| 204 | // "-O0", |
| 205 | ], |
| 206 | |
| 207 | product_variables: { |
| 208 | eng: { |
| 209 | // Enable sanitizer ONLY on eng builds |
| 210 | //sanitize: { |
| 211 | // address: true, |
| 212 | //}, |
| 213 | }, |
| 214 | debuggable: { |
| 215 | // Add a flag to enable stats log printing from statsd on debug builds. |
| 216 | cflags: ["-DVERY_VERBOSE_PRINTING"], |
| 217 | }, |
| 218 | }, |
| 219 | |
| 220 | proto: { |
| 221 | type: "lite", |
| 222 | }, |
| 223 | |
| 224 | shared_libs: ["libgtest_prod"], |
| 225 | |
Howard Ro | 1260bb4 | 2018-10-29 17:22:36 -0700 | [diff] [blame] | 226 | vintf_fragments: ["android.frameworks.stats@1.0-service.xml"], |
| 227 | |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 228 | init_rc: ["statsd.rc"], |
| 229 | } |
| 230 | |
| 231 | // ============== |
| 232 | // statsd_test |
| 233 | // ============== |
| 234 | |
| 235 | cc_test { |
| 236 | name: "statsd_test", |
| 237 | defaults: ["statsd_defaults"], |
| 238 | test_suites: ["device-tests"], |
| 239 | |
| 240 | cflags: [ |
| 241 | "-Wall", |
| 242 | "-Werror", |
| 243 | "-Wno-missing-field-initializers", |
| 244 | "-Wno-unused-variable", |
| 245 | "-Wno-unused-function", |
| 246 | "-Wno-unused-parameter", |
| 247 | ], |
| 248 | |
| 249 | srcs: [ |
Colin Cross | 3f51ab5 | 2018-10-26 23:28:02 -0700 | [diff] [blame] | 250 | // atom_field_options.proto needs field_options.proto, but that is |
| 251 | // not included in libprotobuf-cpp-lite, so compile it here. |
| 252 | ":libprotobuf-internal-protos", |
| 253 | |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 254 | "src/atom_field_options.proto", |
| 255 | "src/atoms.proto", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 256 | "src/shell/shell_data.proto", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 257 | "src/stats_log.proto", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 258 | "tests/AlarmMonitor_test.cpp", |
| 259 | "tests/anomaly/AlarmTracker_test.cpp", |
| 260 | "tests/anomaly/AnomalyTracker_test.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 261 | "tests/condition/CombinationConditionTracker_test.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 262 | "tests/condition/ConditionTimer_test.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 263 | "tests/condition/SimpleConditionTracker_test.cpp", |
tsaichristine | c46fbf9 | 2019-09-04 15:47:57 -0700 | [diff] [blame] | 264 | "tests/condition/StateConditionTracker_test.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 265 | "tests/ConfigManager_test.cpp", |
| 266 | "tests/e2e/Alarm_e2e_test.cpp", |
| 267 | "tests/e2e/Anomaly_count_e2e_test.cpp", |
| 268 | "tests/e2e/Anomaly_duration_sum_e2e_test.cpp", |
| 269 | "tests/e2e/Attribution_e2e_test.cpp", |
| 270 | "tests/e2e/ConfigTtl_e2e_test.cpp", |
tsaichristine | d21aacf | 2019-10-07 14:47:38 -0700 | [diff] [blame] | 271 | "tests/e2e/CountMetric_e2e_test.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 272 | "tests/e2e/DurationMetric_e2e_test.cpp", |
| 273 | "tests/e2e/GaugeMetric_e2e_pull_test.cpp", |
| 274 | "tests/e2e/GaugeMetric_e2e_push_test.cpp", |
| 275 | "tests/e2e/MetricActivation_e2e_test.cpp", |
| 276 | "tests/e2e/MetricConditionLink_e2e_test.cpp", |
| 277 | "tests/e2e/PartialBucket_e2e_test.cpp", |
| 278 | "tests/e2e/ValueMetric_pull_e2e_test.cpp", |
| 279 | "tests/e2e/WakelockDuration_e2e_test.cpp", |
| 280 | "tests/external/GpuStatsPuller_test.cpp", |
| 281 | "tests/external/IncidentReportArgs_test.cpp", |
| 282 | "tests/external/puller_util_test.cpp", |
Tej Singh | 8981763 | 2019-12-09 16:58:08 -0800 | [diff] [blame] | 283 | "tests/external/StatsCallbackPuller_test.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 284 | "tests/external/StatsPuller_test.cpp", |
| 285 | "tests/FieldValue_test.cpp", |
| 286 | "tests/guardrail/StatsdStats_test.cpp", |
| 287 | "tests/indexed_priority_queue_test.cpp", |
| 288 | "tests/log_event/LogEventQueue_test.cpp", |
| 289 | "tests/LogEntryMatcher_test.cpp", |
| 290 | "tests/LogEvent_test.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 291 | "tests/metrics/CountMetricProducer_test.cpp", |
| 292 | "tests/metrics/DurationMetricProducer_test.cpp", |
| 293 | "tests/metrics/EventMetricProducer_test.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 294 | "tests/metrics/GaugeMetricProducer_test.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 295 | "tests/metrics/MaxDurationTracker_test.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 296 | "tests/metrics/metrics_test_helper.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 297 | "tests/metrics/OringDurationTracker_test.cpp", |
| 298 | "tests/metrics/ValueMetricProducer_test.cpp", |
| 299 | "tests/MetricsManager_test.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 300 | "tests/shell/ShellSubscriber_test.cpp", |
tsaichristine | 1097864 | 2019-09-10 14:12:49 -0700 | [diff] [blame] | 301 | "tests/state/StateTracker_test.cpp", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 302 | "tests/statsd_test_util.cpp", |
| 303 | "tests/StatsLogProcessor_test.cpp", |
| 304 | "tests/StatsService_test.cpp", |
| 305 | "tests/storage/StorageManager_test.cpp", |
| 306 | "tests/UidMap_test.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 307 | ], |
| 308 | |
| 309 | static_libs: [ |
| 310 | "libgmock", |
| 311 | "libplatformprotos", |
| 312 | ], |
| 313 | |
| 314 | proto: { |
Colin Cross | 3f51ab5 | 2018-10-26 23:28:02 -0700 | [diff] [blame] | 315 | type: "lite", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 316 | include_dirs: ["external/protobuf/src"], |
| 317 | }, |
| 318 | |
Ruchir Rastogi | 1fb525e | 2019-11-07 14:08:24 -0800 | [diff] [blame] | 319 | shared_libs: [ |
| 320 | "libprotobuf-cpp-lite", |
| 321 | "libstatssocket" |
| 322 | ], |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 323 | |
| 324 | } |
| 325 | |
| 326 | //############################# |
| 327 | // statsd micro benchmark |
| 328 | //############################# |
| 329 | |
| 330 | cc_benchmark { |
| 331 | name: "statsd_benchmark", |
| 332 | defaults: ["statsd_defaults"], |
| 333 | |
| 334 | srcs: [ |
Colin Cross | 3f51ab5 | 2018-10-26 23:28:02 -0700 | [diff] [blame] | 335 | // atom_field_options.proto needs field_options.proto, but that is |
| 336 | // not included in libprotobuf-cpp-lite, so compile it here. |
| 337 | ":libprotobuf-internal-protos", |
| 338 | |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 339 | "benchmark/duration_metric_benchmark.cpp", |
| 340 | "benchmark/filter_value_benchmark.cpp", |
| 341 | "benchmark/get_dimensions_for_condition_benchmark.cpp", |
| 342 | "benchmark/hello_world_benchmark.cpp", |
| 343 | "benchmark/log_event_benchmark.cpp", |
| 344 | "benchmark/main.cpp", |
| 345 | "benchmark/metric_util.cpp", |
| 346 | "benchmark/stats_write_benchmark.cpp", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 347 | "src/atom_field_options.proto", |
| 348 | "src/atoms.proto", |
| 349 | "src/stats_log.proto", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 350 | ], |
| 351 | |
| 352 | proto: { |
Colin Cross | 3f51ab5 | 2018-10-26 23:28:02 -0700 | [diff] [blame] | 353 | type: "lite", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 354 | include_dirs: ["external/protobuf/src"], |
| 355 | }, |
| 356 | |
| 357 | cflags: [ |
| 358 | "-Wall", |
| 359 | "-Werror", |
| 360 | "-Wno-unused-parameter", |
| 361 | "-Wno-unused-variable", |
| 362 | "-Wno-unused-function", |
| 363 | |
| 364 | // Bug: http://b/29823425 Disable -Wvarargs for Clang update to r271374 |
Ruchir Rastogi | 1736ba4 | 2019-11-04 14:37:13 -0800 | [diff] [blame] | 365 | "-Wno-varargs", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 366 | ], |
| 367 | |
| 368 | static_libs: [ |
| 369 | "libplatformprotos", |
| 370 | ], |
| 371 | |
| 372 | shared_libs: [ |
| 373 | "libgtest_prod", |
Colin Cross | 3f51ab5 | 2018-10-26 23:28:02 -0700 | [diff] [blame] | 374 | "libprotobuf-cpp-lite", |
Ruchir Rastogi | 1736ba4 | 2019-11-04 14:37:13 -0800 | [diff] [blame] | 375 | "libstatslog", |
| 376 | "libstatssocket", |
Colin Cross | bc2dc31 | 2018-10-26 22:34:06 -0700 | [diff] [blame] | 377 | ], |
| 378 | } |
Joe Onorato | 62c220b | 2017-11-18 20:32:56 -0800 | [diff] [blame] | 379 | |
gopinath | a9864fd | 2018-08-22 16:45:57 -0700 | [diff] [blame] | 380 | // ==== java proto device library (for test only) ============================== |
| 381 | java_library { |
| 382 | name: "statsdprotolite", |
Anton Hansson | 791551a | 2019-12-19 10:17:46 +0000 | [diff] [blame] | 383 | sdk_version: "core_current", |
gopinath | a9864fd | 2018-08-22 16:45:57 -0700 | [diff] [blame] | 384 | proto: { |
| 385 | type: "lite", |
| 386 | include_dirs: ["external/protobuf/src"], |
| 387 | }, |
| 388 | |
| 389 | srcs: [ |
gopinath | a9864fd | 2018-08-22 16:45:57 -0700 | [diff] [blame] | 390 | "src/atoms.proto", |
Yao Chen | 35cb8d6 | 2019-01-03 16:49:14 -0800 | [diff] [blame] | 391 | "src/shell/shell_config.proto", |
| 392 | "src/shell/shell_data.proto", |
Ruchir Rastogi | 23d60f9 | 2019-09-16 15:23:56 -0700 | [diff] [blame] | 393 | "src/stats_log.proto", |
| 394 | "src/statsd_config.proto", |
gopinath | a9864fd | 2018-08-22 16:45:57 -0700 | [diff] [blame] | 395 | ], |
| 396 | |
| 397 | static_libs: [ |
| 398 | "platformprotoslite", |
| 399 | ], |
| 400 | // Protos have lots of MissingOverride and similar. |
| 401 | errorprone: { |
| 402 | javacflags: ["-XepDisableAllChecks"], |
| 403 | }, |
| 404 | } |
Harry Zhang | fe16c8f | 2019-02-26 10:47:04 -0800 | [diff] [blame] | 405 | |
| 406 | // Filegroup for statsd config proto definition. |
| 407 | filegroup { |
| 408 | name: "statsd-config-proto-def", |
| 409 | srcs: ["src/statsd_config.proto"], |
| 410 | } |