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