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