xref: /aosp_15_r20/external/cronet/third_party/metrics_proto/Android.bp (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1// Copyright (C) 2022 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// This file is automatically generated by gn2bp/gen_android_bp.py. Do not edit.
16
17// GN: Package-Artificial
18package {
19    default_applicable_licenses: [
20        "external_cronet_third_party_metrics_proto_license",
21    ],
22}
23
24// GN: License-Artificial
25license {
26    name: "external_cronet_third_party_metrics_proto_license",
27    visibility: [
28        ":__subpackages__",
29    ],
30    license_text: [
31        "LICENSE",
32    ],
33    license_kinds: [
34        "SPDX-license-identifier-BSD",
35    ],
36}
37
38// GN: //third_party/metrics_proto:metrics_proto
39cc_library_static {
40    name: "cronet_aml_third_party_metrics_proto_metrics_proto",
41    srcs: [
42        ":cronet_aml_third_party_metrics_proto_metrics_proto_gen",
43    ],
44    shared_libs: [
45        "liblog",
46        "libprotobuf-cpp-lite",
47    ],
48    generated_headers: [
49        "cronet_aml_third_party_metrics_proto_metrics_proto_gen_headers",
50    ],
51    export_generated_headers: [
52        "cronet_aml_third_party_metrics_proto_metrics_proto_gen_headers",
53    ],
54    defaults: [
55        "cronet_aml_cc_defaults",
56    ],
57    cflags: [
58        "-DANDROID",
59        "-DANDROID_NDK_VERSION_ROLL=r26b_1",
60        "-DCR_CLANG_REVISION=\"llvmorg-19-init-8091-gab037c4f-22\"",
61        "-DCR_LIBCXX_REVISION=e3b94d0e5b86883fd77696bf10dc33ba250ba99b",
62        "-DDYNAMIC_ANNOTATIONS_ENABLED=0",
63        "-DGOOGLE_PROTOBUF_INTERNAL_DONATE_STEAL_INLINE=0",
64        "-DGOOGLE_PROTOBUF_NO_RTTI",
65        "-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER",
66        "-DHAVE_PTHREAD",
67        "-DHAVE_SYS_UIO_H",
68        "-DNDEBUG",
69        "-DNO_UNWIND_TABLES",
70        "-DNVALGRIND",
71        "-DOFFICIAL_BUILD",
72        "-D_GNU_SOURCE",
73        "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
74        "-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE",
75        "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
76        "-D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__",
77        "-D__STDC_CONSTANT_MACROS",
78        "-D__STDC_FORMAT_MACROS",
79        "-fdata-sections",
80        "-ffunction-sections",
81        "-fno-asynchronous-unwind-tables",
82        "-fno-unwind-tables",
83        "-fstack-protector",
84        "-fvisibility-inlines-hidden",
85        "-fvisibility=hidden",
86        "-g1",
87    ],
88    include_dirs: [
89        "external/cronet/",
90        "external/cronet/buildtools/third_party/libc++/",
91        "external/cronet/third_party/libc++/src/include",
92        "external/cronet/third_party/libc++abi/src/include",
93        "external/cronet/third_party/protobuf/src/",
94    ],
95    cpp_std: "c++20",
96    ldflags: [
97        "-Wl,--as-needed",
98        "-Wl,--gc-sections",
99        "-Wl,--icf=all",
100    ],
101    visibility: [
102        "//external/cronet:__subpackages__",
103    ],
104    target: {
105        android_arm: {
106            cflags: [
107                "-D_FORTIFY_SOURCE=2",
108            ],
109        },
110        android_arm64: {
111            cflags: [
112                "-D_FORTIFY_SOURCE=2",
113                "-O2",
114                "-mno-outline",
115            ],
116        },
117        android_x86: {
118            cflags: [
119                "-D_FORTIFY_SOURCE=2",
120                "-msse3",
121            ],
122        },
123        android_x86_64: {
124            cflags: [
125                "-D_FORTIFY_SOURCE=2",
126                "-msse3",
127            ],
128        },
129    },
130}
131
132// GN: //third_party/metrics_proto:metrics_proto__testing
133cc_library_static {
134    name: "cronet_aml_third_party_metrics_proto_metrics_proto__testing",
135    srcs: [
136        ":cronet_aml_third_party_metrics_proto_metrics_proto_gen__testing",
137    ],
138    shared_libs: [
139        "liblog",
140        "libprotobuf-cpp-lite",
141    ],
142    generated_headers: [
143        "cronet_aml_third_party_metrics_proto_metrics_proto_gen__testing_headers",
144    ],
145    export_generated_headers: [
146        "cronet_aml_third_party_metrics_proto_metrics_proto_gen__testing_headers",
147    ],
148    defaults: [
149        "cronet_aml_cc_defaults",
150    ],
151    cflags: [
152        "-DANDROID",
153        "-DANDROID_NDK_VERSION_ROLL=r26b_1",
154        "-DCR_CLANG_REVISION=\"llvmorg-19-init-8091-gab037c4f-22\"",
155        "-DCR_LIBCXX_REVISION=e3b94d0e5b86883fd77696bf10dc33ba250ba99b",
156        "-DDYNAMIC_ANNOTATIONS_ENABLED=0",
157        "-DGOOGLE_PROTOBUF_INTERNAL_DONATE_STEAL_INLINE=0",
158        "-DGOOGLE_PROTOBUF_NO_RTTI",
159        "-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER",
160        "-DHAVE_PTHREAD",
161        "-DHAVE_SYS_UIO_H",
162        "-DNDEBUG",
163        "-DNO_UNWIND_TABLES",
164        "-DNVALGRIND",
165        "-DOFFICIAL_BUILD",
166        "-D_GNU_SOURCE",
167        "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
168        "-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE",
169        "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
170        "-D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__",
171        "-D__STDC_CONSTANT_MACROS",
172        "-D__STDC_FORMAT_MACROS",
173        "-fdata-sections",
174        "-ffunction-sections",
175        "-fno-asynchronous-unwind-tables",
176        "-fno-unwind-tables",
177        "-fstack-protector",
178        "-fvisibility-inlines-hidden",
179        "-fvisibility=hidden",
180        "-g1",
181    ],
182    include_dirs: [
183        "external/cronet/",
184        "external/cronet/buildtools/third_party/libc++/",
185        "external/cronet/third_party/libc++/src/include",
186        "external/cronet/third_party/libc++abi/src/include",
187        "external/cronet/third_party/protobuf/src/",
188    ],
189    cpp_std: "c++20",
190    ldflags: [
191        "-Wl,--as-needed",
192        "-Wl,--gc-sections",
193        "-Wl,--icf=all",
194    ],
195    visibility: [
196        "//external/cronet:__subpackages__",
197    ],
198    target: {
199        android_arm: {
200            cflags: [
201                "-D_FORTIFY_SOURCE=2",
202            ],
203        },
204        android_arm64: {
205            cflags: [
206                "-D_FORTIFY_SOURCE=2",
207                "-O2",
208                "-mno-outline",
209            ],
210        },
211        android_x86: {
212            cflags: [
213                "-D_FORTIFY_SOURCE=2",
214                "-msse3",
215            ],
216        },
217        android_x86_64: {
218            cflags: [
219                "-D_FORTIFY_SOURCE=2",
220                "-msse3",
221            ],
222        },
223    },
224}
225
226// GN: //third_party/metrics_proto:metrics_proto_gen
227cc_genrule {
228    name: "cronet_aml_third_party_metrics_proto_metrics_proto_gen",
229    srcs: [
230        "call_stack_profile.proto",
231        "cast_logs.proto",
232        "chrome_os_app_list_launch_event.proto",
233        "chrome_user_metrics_extension.proto",
234        "custom_tab_session.proto",
235        "device_state.proto",
236        "execution_context.proto",
237        "extension_install.proto",
238        "histogram_event.proto",
239        "omnibox_event.proto",
240        "omnibox_focus_type.proto",
241        "omnibox_input_type.proto",
242        "perf_data.proto",
243        "perf_stat.proto",
244        "printer_event.proto",
245        "reporting_info.proto",
246        "sampled_profile.proto",
247        "structured_data.proto",
248        "system_profile.proto",
249        "trace_log.proto",
250        "translate_event.proto",
251        "ukm/aggregate.proto",
252        "ukm/entry.proto",
253        "ukm/report.proto",
254        "ukm/source.proto",
255        "ukm/web_features.proto",
256        "user_action_event.proto",
257        "user_demographics.proto",
258    ],
259    tools: [
260        "cronet_aml_third_party_protobuf_protoc",
261    ],
262    cmd: "$(location cronet_aml_third_party_protobuf_protoc) --proto_path=external/cronet/third_party/metrics_proto --cpp_out=lite=true:$(genDir)/third_party/metrics_proto/ $(in)",
263    out: [
264        "third_party/metrics_proto/call_stack_profile.pb.cc",
265        "third_party/metrics_proto/cast_logs.pb.cc",
266        "third_party/metrics_proto/chrome_os_app_list_launch_event.pb.cc",
267        "third_party/metrics_proto/chrome_user_metrics_extension.pb.cc",
268        "third_party/metrics_proto/custom_tab_session.pb.cc",
269        "third_party/metrics_proto/device_state.pb.cc",
270        "third_party/metrics_proto/execution_context.pb.cc",
271        "third_party/metrics_proto/extension_install.pb.cc",
272        "third_party/metrics_proto/histogram_event.pb.cc",
273        "third_party/metrics_proto/omnibox_event.pb.cc",
274        "third_party/metrics_proto/omnibox_focus_type.pb.cc",
275        "third_party/metrics_proto/omnibox_input_type.pb.cc",
276        "third_party/metrics_proto/perf_data.pb.cc",
277        "third_party/metrics_proto/perf_stat.pb.cc",
278        "third_party/metrics_proto/printer_event.pb.cc",
279        "third_party/metrics_proto/reporting_info.pb.cc",
280        "third_party/metrics_proto/sampled_profile.pb.cc",
281        "third_party/metrics_proto/structured_data.pb.cc",
282        "third_party/metrics_proto/system_profile.pb.cc",
283        "third_party/metrics_proto/trace_log.pb.cc",
284        "third_party/metrics_proto/translate_event.pb.cc",
285        "third_party/metrics_proto/ukm/aggregate.pb.cc",
286        "third_party/metrics_proto/ukm/entry.pb.cc",
287        "third_party/metrics_proto/ukm/report.pb.cc",
288        "third_party/metrics_proto/ukm/source.pb.cc",
289        "third_party/metrics_proto/ukm/web_features.pb.cc",
290        "third_party/metrics_proto/user_action_event.pb.cc",
291        "third_party/metrics_proto/user_demographics.pb.cc",
292    ],
293    apex_available: [
294        "com.android.tethering",
295    ],
296    visibility: [
297        "//external/cronet:__subpackages__",
298    ],
299}
300
301// GN: //third_party/metrics_proto:metrics_proto_gen__testing
302cc_genrule {
303    name: "cronet_aml_third_party_metrics_proto_metrics_proto_gen__testing",
304    srcs: [
305        "call_stack_profile.proto",
306        "cast_logs.proto",
307        "chrome_os_app_list_launch_event.proto",
308        "chrome_user_metrics_extension.proto",
309        "custom_tab_session.proto",
310        "device_state.proto",
311        "execution_context.proto",
312        "extension_install.proto",
313        "histogram_event.proto",
314        "omnibox_event.proto",
315        "omnibox_focus_type.proto",
316        "omnibox_input_type.proto",
317        "perf_data.proto",
318        "perf_stat.proto",
319        "printer_event.proto",
320        "reporting_info.proto",
321        "sampled_profile.proto",
322        "structured_data.proto",
323        "system_profile.proto",
324        "trace_log.proto",
325        "translate_event.proto",
326        "ukm/aggregate.proto",
327        "ukm/entry.proto",
328        "ukm/report.proto",
329        "ukm/source.proto",
330        "ukm/web_features.proto",
331        "user_action_event.proto",
332        "user_demographics.proto",
333    ],
334    tools: [
335        "cronet_aml_third_party_protobuf_protoc",
336    ],
337    cmd: "$(location cronet_aml_third_party_protobuf_protoc) --proto_path=external/cronet/third_party/metrics_proto --cpp_out=lite=true:$(genDir)/third_party/metrics_proto/ $(in)",
338    out: [
339        "third_party/metrics_proto/call_stack_profile.pb.cc",
340        "third_party/metrics_proto/cast_logs.pb.cc",
341        "third_party/metrics_proto/chrome_os_app_list_launch_event.pb.cc",
342        "third_party/metrics_proto/chrome_user_metrics_extension.pb.cc",
343        "third_party/metrics_proto/custom_tab_session.pb.cc",
344        "third_party/metrics_proto/device_state.pb.cc",
345        "third_party/metrics_proto/execution_context.pb.cc",
346        "third_party/metrics_proto/extension_install.pb.cc",
347        "third_party/metrics_proto/histogram_event.pb.cc",
348        "third_party/metrics_proto/omnibox_event.pb.cc",
349        "third_party/metrics_proto/omnibox_focus_type.pb.cc",
350        "third_party/metrics_proto/omnibox_input_type.pb.cc",
351        "third_party/metrics_proto/perf_data.pb.cc",
352        "third_party/metrics_proto/perf_stat.pb.cc",
353        "third_party/metrics_proto/printer_event.pb.cc",
354        "third_party/metrics_proto/reporting_info.pb.cc",
355        "third_party/metrics_proto/sampled_profile.pb.cc",
356        "third_party/metrics_proto/structured_data.pb.cc",
357        "third_party/metrics_proto/system_profile.pb.cc",
358        "third_party/metrics_proto/trace_log.pb.cc",
359        "third_party/metrics_proto/translate_event.pb.cc",
360        "third_party/metrics_proto/ukm/aggregate.pb.cc",
361        "third_party/metrics_proto/ukm/entry.pb.cc",
362        "third_party/metrics_proto/ukm/report.pb.cc",
363        "third_party/metrics_proto/ukm/source.pb.cc",
364        "third_party/metrics_proto/ukm/web_features.pb.cc",
365        "third_party/metrics_proto/user_action_event.pb.cc",
366        "third_party/metrics_proto/user_demographics.pb.cc",
367    ],
368    apex_available: [
369        "com.android.tethering",
370    ],
371    visibility: [
372        "//external/cronet:__subpackages__",
373    ],
374}
375
376// GN: //third_party/metrics_proto:metrics_proto_gen__testing
377cc_genrule {
378    name: "cronet_aml_third_party_metrics_proto_metrics_proto_gen__testing_headers",
379    srcs: [
380        "call_stack_profile.proto",
381        "cast_logs.proto",
382        "chrome_os_app_list_launch_event.proto",
383        "chrome_user_metrics_extension.proto",
384        "custom_tab_session.proto",
385        "device_state.proto",
386        "execution_context.proto",
387        "extension_install.proto",
388        "histogram_event.proto",
389        "omnibox_event.proto",
390        "omnibox_focus_type.proto",
391        "omnibox_input_type.proto",
392        "perf_data.proto",
393        "perf_stat.proto",
394        "printer_event.proto",
395        "reporting_info.proto",
396        "sampled_profile.proto",
397        "structured_data.proto",
398        "system_profile.proto",
399        "trace_log.proto",
400        "translate_event.proto",
401        "ukm/aggregate.proto",
402        "ukm/entry.proto",
403        "ukm/report.proto",
404        "ukm/source.proto",
405        "ukm/web_features.proto",
406        "user_action_event.proto",
407        "user_demographics.proto",
408    ],
409    tools: [
410        "cronet_aml_third_party_protobuf_protoc",
411    ],
412    cmd: "$(location cronet_aml_third_party_protobuf_protoc) --proto_path=external/cronet/third_party/metrics_proto --cpp_out=lite=true:$(genDir)/third_party/metrics_proto/ $(in)",
413    out: [
414        "third_party/metrics_proto/call_stack_profile.pb.h",
415        "third_party/metrics_proto/cast_logs.pb.h",
416        "third_party/metrics_proto/chrome_os_app_list_launch_event.pb.h",
417        "third_party/metrics_proto/chrome_user_metrics_extension.pb.h",
418        "third_party/metrics_proto/custom_tab_session.pb.h",
419        "third_party/metrics_proto/device_state.pb.h",
420        "third_party/metrics_proto/execution_context.pb.h",
421        "third_party/metrics_proto/extension_install.pb.h",
422        "third_party/metrics_proto/histogram_event.pb.h",
423        "third_party/metrics_proto/omnibox_event.pb.h",
424        "third_party/metrics_proto/omnibox_focus_type.pb.h",
425        "third_party/metrics_proto/omnibox_input_type.pb.h",
426        "third_party/metrics_proto/perf_data.pb.h",
427        "third_party/metrics_proto/perf_stat.pb.h",
428        "third_party/metrics_proto/printer_event.pb.h",
429        "third_party/metrics_proto/reporting_info.pb.h",
430        "third_party/metrics_proto/sampled_profile.pb.h",
431        "third_party/metrics_proto/structured_data.pb.h",
432        "third_party/metrics_proto/system_profile.pb.h",
433        "third_party/metrics_proto/trace_log.pb.h",
434        "third_party/metrics_proto/translate_event.pb.h",
435        "third_party/metrics_proto/ukm/aggregate.pb.h",
436        "third_party/metrics_proto/ukm/entry.pb.h",
437        "third_party/metrics_proto/ukm/report.pb.h",
438        "third_party/metrics_proto/ukm/source.pb.h",
439        "third_party/metrics_proto/ukm/web_features.pb.h",
440        "third_party/metrics_proto/user_action_event.pb.h",
441        "third_party/metrics_proto/user_demographics.pb.h",
442    ],
443    export_include_dirs: [
444        ".",
445        "protos",
446        "third_party/metrics_proto",
447    ],
448    apex_available: [
449        "com.android.tethering",
450    ],
451}
452
453// GN: //third_party/metrics_proto:metrics_proto_gen
454cc_genrule {
455    name: "cronet_aml_third_party_metrics_proto_metrics_proto_gen_headers",
456    srcs: [
457        "call_stack_profile.proto",
458        "cast_logs.proto",
459        "chrome_os_app_list_launch_event.proto",
460        "chrome_user_metrics_extension.proto",
461        "custom_tab_session.proto",
462        "device_state.proto",
463        "execution_context.proto",
464        "extension_install.proto",
465        "histogram_event.proto",
466        "omnibox_event.proto",
467        "omnibox_focus_type.proto",
468        "omnibox_input_type.proto",
469        "perf_data.proto",
470        "perf_stat.proto",
471        "printer_event.proto",
472        "reporting_info.proto",
473        "sampled_profile.proto",
474        "structured_data.proto",
475        "system_profile.proto",
476        "trace_log.proto",
477        "translate_event.proto",
478        "ukm/aggregate.proto",
479        "ukm/entry.proto",
480        "ukm/report.proto",
481        "ukm/source.proto",
482        "ukm/web_features.proto",
483        "user_action_event.proto",
484        "user_demographics.proto",
485    ],
486    tools: [
487        "cronet_aml_third_party_protobuf_protoc",
488    ],
489    cmd: "$(location cronet_aml_third_party_protobuf_protoc) --proto_path=external/cronet/third_party/metrics_proto --cpp_out=lite=true:$(genDir)/third_party/metrics_proto/ $(in)",
490    out: [
491        "third_party/metrics_proto/call_stack_profile.pb.h",
492        "third_party/metrics_proto/cast_logs.pb.h",
493        "third_party/metrics_proto/chrome_os_app_list_launch_event.pb.h",
494        "third_party/metrics_proto/chrome_user_metrics_extension.pb.h",
495        "third_party/metrics_proto/custom_tab_session.pb.h",
496        "third_party/metrics_proto/device_state.pb.h",
497        "third_party/metrics_proto/execution_context.pb.h",
498        "third_party/metrics_proto/extension_install.pb.h",
499        "third_party/metrics_proto/histogram_event.pb.h",
500        "third_party/metrics_proto/omnibox_event.pb.h",
501        "third_party/metrics_proto/omnibox_focus_type.pb.h",
502        "third_party/metrics_proto/omnibox_input_type.pb.h",
503        "third_party/metrics_proto/perf_data.pb.h",
504        "third_party/metrics_proto/perf_stat.pb.h",
505        "third_party/metrics_proto/printer_event.pb.h",
506        "third_party/metrics_proto/reporting_info.pb.h",
507        "third_party/metrics_proto/sampled_profile.pb.h",
508        "third_party/metrics_proto/structured_data.pb.h",
509        "third_party/metrics_proto/system_profile.pb.h",
510        "third_party/metrics_proto/trace_log.pb.h",
511        "third_party/metrics_proto/translate_event.pb.h",
512        "third_party/metrics_proto/ukm/aggregate.pb.h",
513        "third_party/metrics_proto/ukm/entry.pb.h",
514        "third_party/metrics_proto/ukm/report.pb.h",
515        "third_party/metrics_proto/ukm/source.pb.h",
516        "third_party/metrics_proto/ukm/web_features.pb.h",
517        "third_party/metrics_proto/user_action_event.pb.h",
518        "third_party/metrics_proto/user_demographics.pb.h",
519    ],
520    export_include_dirs: [
521        ".",
522        "protos",
523        "third_party/metrics_proto",
524    ],
525    apex_available: [
526        "com.android.tethering",
527    ],
528}
529