xref: /aosp_15_r20/external/cronet/net/http/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_license",
21    ],
22}
23
24// GN: //net/http:transport_security_state_generated_files
25cc_library_static {
26    name: "cronet_aml_net_http_transport_security_state_generated_files",
27    srcs: [
28        "transport_security_state.cc",
29    ],
30    shared_libs: [
31        "//external/cronet/third_party/boringssl:libcrypto",
32        "//external/cronet/third_party/boringssl:libpki",
33        "//external/cronet/third_party/boringssl:libssl",
34        "libandroid",
35        "liblog",
36        "libprotobuf-cpp-lite",
37        "libz",
38    ],
39    generated_headers: [
40        "cronet_aml_base_allocator_buildflags",
41        "cronet_aml_base_allocator_partition_allocator_src_partition_alloc_chromecast_buildflags",
42        "cronet_aml_base_allocator_partition_allocator_src_partition_alloc_chromeos_buildflags",
43        "cronet_aml_base_allocator_partition_allocator_src_partition_alloc_debugging_buildflags",
44        "cronet_aml_base_allocator_partition_allocator_src_partition_alloc_partition_alloc_buildflags",
45        "cronet_aml_base_allocator_partition_allocator_src_partition_alloc_raw_ptr_buildflags",
46        "cronet_aml_base_anchor_functions_buildflags",
47        "cronet_aml_base_android_runtime_jni_headers__action",
48        "cronet_aml_base_base_jni__action",
49        "cronet_aml_base_base_shared_preferences_jni__action",
50        "cronet_aml_base_build_date",
51        "cronet_aml_base_cfi_buildflags",
52        "cronet_aml_base_check_version_internal_action",
53        "cronet_aml_base_clang_profiling_buildflags",
54        "cronet_aml_base_debugging_buildflags",
55        "cronet_aml_base_feature_list_buildflags",
56        "cronet_aml_base_fuzzing_buildflags",
57        "cronet_aml_base_ios_cronet_buildflags",
58        "cronet_aml_base_logging_buildflags",
59        "cronet_aml_base_message_pump_buildflags",
60        "cronet_aml_base_orderfile_buildflags",
61        "cronet_aml_base_power_monitor_buildflags",
62        "cronet_aml_base_process_launcher_jni__action",
63        "cronet_aml_base_profiler_buildflags",
64        "cronet_aml_base_protected_memory_buildflags",
65        "cronet_aml_base_rust_buildflags",
66        "cronet_aml_base_sanitizer_buildflags",
67        "cronet_aml_base_synchronization_buildflags",
68        "cronet_aml_base_tracing_buildflags",
69        "cronet_aml_build_blink_buildflags",
70        "cronet_aml_build_branding_buildflags",
71        "cronet_aml_build_chromecast_buildflags",
72        "cronet_aml_build_chromeos_buildflags",
73        "cronet_aml_build_config_compiler_compiler_buildflags",
74        "cronet_aml_build_ios_buildflags",
75        "cronet_aml_build_robolectric_buildflags",
76        "cronet_aml_crypto_buildflags",
77        "cronet_aml_net_base_registry_controlled_domains_registry_controlled_domains",
78        "cronet_aml_net_buildflags",
79        "cronet_aml_net_cronet_buildflags",
80        "cronet_aml_net_isolation_info_proto_gen_headers",
81        "cronet_aml_net_net_jni_headers__action",
82        "cronet_aml_net_net_nqe_proto_gen_headers",
83        "cronet_aml_net_third_party_quiche_net_quic_proto_gen_headers",
84        "cronet_aml_net_third_party_quiche_net_quic_test_tools_proto_gen_headers",
85        "cronet_aml_url_buildflags",
86        "cronet_aml_url_url_jni_headers__action",
87    ],
88    export_generated_headers: [
89        "cronet_aml_base_allocator_buildflags",
90        "cronet_aml_base_allocator_partition_allocator_src_partition_alloc_chromecast_buildflags",
91        "cronet_aml_base_allocator_partition_allocator_src_partition_alloc_chromeos_buildflags",
92        "cronet_aml_base_allocator_partition_allocator_src_partition_alloc_debugging_buildflags",
93        "cronet_aml_base_allocator_partition_allocator_src_partition_alloc_partition_alloc_buildflags",
94        "cronet_aml_base_allocator_partition_allocator_src_partition_alloc_raw_ptr_buildflags",
95        "cronet_aml_base_anchor_functions_buildflags",
96        "cronet_aml_base_android_runtime_jni_headers__action",
97        "cronet_aml_base_base_jni__action",
98        "cronet_aml_base_base_shared_preferences_jni__action",
99        "cronet_aml_base_build_date",
100        "cronet_aml_base_cfi_buildflags",
101        "cronet_aml_base_check_version_internal_action",
102        "cronet_aml_base_clang_profiling_buildflags",
103        "cronet_aml_base_debugging_buildflags",
104        "cronet_aml_base_feature_list_buildflags",
105        "cronet_aml_base_fuzzing_buildflags",
106        "cronet_aml_base_ios_cronet_buildflags",
107        "cronet_aml_base_logging_buildflags",
108        "cronet_aml_base_message_pump_buildflags",
109        "cronet_aml_base_orderfile_buildflags",
110        "cronet_aml_base_power_monitor_buildflags",
111        "cronet_aml_base_process_launcher_jni__action",
112        "cronet_aml_base_profiler_buildflags",
113        "cronet_aml_base_protected_memory_buildflags",
114        "cronet_aml_base_rust_buildflags",
115        "cronet_aml_base_sanitizer_buildflags",
116        "cronet_aml_base_synchronization_buildflags",
117        "cronet_aml_base_tracing_buildflags",
118        "cronet_aml_build_blink_buildflags",
119        "cronet_aml_build_branding_buildflags",
120        "cronet_aml_build_chromecast_buildflags",
121        "cronet_aml_build_chromeos_buildflags",
122        "cronet_aml_build_config_compiler_compiler_buildflags",
123        "cronet_aml_build_ios_buildflags",
124        "cronet_aml_build_robolectric_buildflags",
125        "cronet_aml_crypto_buildflags",
126        "cronet_aml_net_base_registry_controlled_domains_registry_controlled_domains",
127        "cronet_aml_net_buildflags",
128        "cronet_aml_net_cronet_buildflags",
129        "cronet_aml_net_isolation_info_proto_gen_headers",
130        "cronet_aml_net_net_jni_headers__action",
131        "cronet_aml_net_net_nqe_proto_gen_headers",
132        "cronet_aml_net_third_party_quiche_net_quic_proto_gen_headers",
133        "cronet_aml_net_third_party_quiche_net_quic_test_tools_proto_gen_headers",
134        "cronet_aml_url_buildflags",
135        "cronet_aml_url_url_jni_headers__action",
136    ],
137    defaults: [
138        "cronet_aml_cc_defaults",
139    ],
140    cflags: [
141        "-DANDROID",
142        "-DANDROID_NDK_VERSION_ROLL=r26b_1",
143        "-DCR_CLANG_REVISION=\"llvmorg-19-init-8091-gab037c4f-22\"",
144        "-DCR_LIBCXX_REVISION=e3b94d0e5b86883fd77696bf10dc33ba250ba99b",
145        "-DDYNAMIC_ANNOTATIONS_ENABLED=0",
146        "-DENABLE_BUILT_IN_DNS",
147        "-DGOOGLE_PROTOBUF_INTERNAL_DONATE_STEAL_INLINE=0",
148        "-DGOOGLE_PROTOBUF_NO_RTTI",
149        "-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER",
150        "-DHAVE_PTHREAD",
151        "-DHAVE_SYS_UIO_H",
152        "-DNDEBUG",
153        "-DNET_IMPLEMENTATION",
154        "-DNO_UNWIND_TABLES",
155        "-DNVALGRIND",
156        "-DOFFICIAL_BUILD",
157        "-D_GNU_SOURCE",
158        "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
159        "-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE",
160        "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
161        "-D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__",
162        "-D__STDC_CONSTANT_MACROS",
163        "-D__STDC_FORMAT_MACROS",
164        "-fdata-sections",
165        "-ffunction-sections",
166        "-fno-asynchronous-unwind-tables",
167        "-fno-unwind-tables",
168        "-fstack-protector",
169        "-fvisibility-inlines-hidden",
170        "-fvisibility=hidden",
171        "-g1",
172    ],
173    include_dirs: [
174        "external/cronet/",
175        "external/cronet/base/allocator/partition_allocator/src/",
176        "external/cronet/buildtools/third_party/libc++/",
177        "external/cronet/net/third_party/quiche/overrides/",
178        "external/cronet/net/third_party/quiche/src/",
179        "external/cronet/net/third_party/quiche/src/quiche/common/platform/default/",
180        "external/cronet/third_party/abseil-cpp/",
181        "external/cronet/third_party/boringssl/src/include/",
182        "external/cronet/third_party/brotli/include/",
183        "external/cronet/third_party/libc++/src/include",
184        "external/cronet/third_party/libc++abi/src/include",
185        "external/cronet/third_party/protobuf/src/",
186    ],
187    cpp_std: "c++20",
188    ldflags: [
189        "-Wl,--as-needed",
190        "-Wl,--gc-sections",
191        "-Wl,--icf=all",
192        "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
193        "-Wl,-wrap,asprintf",
194        "-Wl,-wrap,calloc",
195        "-Wl,-wrap,free",
196        "-Wl,-wrap,getcwd",
197        "-Wl,-wrap,malloc",
198        "-Wl,-wrap,malloc_usable_size",
199        "-Wl,-wrap,memalign",
200        "-Wl,-wrap,posix_memalign",
201        "-Wl,-wrap,pvalloc",
202        "-Wl,-wrap,realloc",
203        "-Wl,-wrap,realpath",
204        "-Wl,-wrap,strdup",
205        "-Wl,-wrap,strndup",
206        "-Wl,-wrap,valloc",
207        "-Wl,-wrap,vasprintf",
208    ],
209    visibility: [
210        "//external/cronet:__subpackages__",
211    ],
212    target: {
213        android_arm: {
214            cflags: [
215                "-D_FORTIFY_SOURCE=2",
216            ],
217        },
218        android_arm64: {
219            cflags: [
220                "-D_FORTIFY_SOURCE=2",
221                "-O2",
222                "-mno-outline",
223            ],
224        },
225        android_x86: {
226            cflags: [
227                "-D_FORTIFY_SOURCE=2",
228                "-msse3",
229            ],
230        },
231        android_x86_64: {
232            cflags: [
233                "-D_FORTIFY_SOURCE=2",
234                "-msse3",
235            ],
236        },
237    },
238}
239
240// GN: //net/http:transport_security_state_generated_files__testing
241cc_library_static {
242    name: "cronet_aml_net_http_transport_security_state_generated_files__testing",
243    srcs: [
244        "transport_security_state.cc",
245    ],
246    shared_libs: [
247        "libandroid",
248        "liblog",
249        "libprotobuf-cpp-lite",
250        "libz",
251    ],
252    generated_headers: [
253        "cronet_aml_base_allocator_buildflags__testing",
254        "cronet_aml_base_allocator_partition_allocator_src_partition_alloc_chromecast_buildflags__testing",
255        "cronet_aml_base_allocator_partition_allocator_src_partition_alloc_chromeos_buildflags__testing",
256        "cronet_aml_base_allocator_partition_allocator_src_partition_alloc_debugging_buildflags__testing",
257        "cronet_aml_base_allocator_partition_allocator_src_partition_alloc_partition_alloc_buildflags__testing",
258        "cronet_aml_base_allocator_partition_allocator_src_partition_alloc_raw_ptr_buildflags__testing",
259        "cronet_aml_base_anchor_functions_buildflags__testing",
260        "cronet_aml_base_build_date__testing",
261        "cronet_aml_base_cfi_buildflags__testing",
262        "cronet_aml_base_check_version_internal_action__testing",
263        "cronet_aml_base_clang_profiling_buildflags__testing",
264        "cronet_aml_base_debugging_buildflags__testing",
265        "cronet_aml_base_feature_list_buildflags__testing",
266        "cronet_aml_base_fuzzing_buildflags__testing",
267        "cronet_aml_base_ios_cronet_buildflags__testing",
268        "cronet_aml_base_logging_buildflags__testing",
269        "cronet_aml_base_message_pump_buildflags__testing",
270        "cronet_aml_base_orderfile_buildflags__testing",
271        "cronet_aml_base_power_monitor_buildflags__testing",
272        "cronet_aml_base_profiler_buildflags__testing",
273        "cronet_aml_base_protected_memory_buildflags__testing",
274        "cronet_aml_base_rust_buildflags__testing",
275        "cronet_aml_base_sanitizer_buildflags__testing",
276        "cronet_aml_base_synchronization_buildflags__testing",
277        "cronet_aml_base_tracing_buildflags__testing",
278        "cronet_aml_build_blink_buildflags__testing",
279        "cronet_aml_build_branding_buildflags__testing",
280        "cronet_aml_build_chromecast_buildflags__testing",
281        "cronet_aml_build_chromeos_buildflags__testing",
282        "cronet_aml_build_config_compiler_compiler_buildflags__testing",
283        "cronet_aml_build_ios_buildflags__testing",
284        "cronet_aml_build_robolectric_buildflags__testing",
285        "cronet_aml_crypto_buildflags__testing",
286        "cronet_aml_net_base_registry_controlled_domains_registry_controlled_domains__testing",
287        "cronet_aml_net_buildflags__testing",
288        "cronet_aml_net_cronet_buildflags__testing",
289        "cronet_aml_net_isolation_info_proto_gen__testing_headers",
290        "cronet_aml_net_net_jni_headers__action__testing",
291        "cronet_aml_net_net_nqe_proto_gen__testing_headers",
292        "cronet_aml_net_third_party_quiche_net_quic_proto_gen__testing_headers",
293        "cronet_aml_net_third_party_quiche_net_quic_test_tools_proto_gen__testing_headers",
294        "cronet_aml_url_buildflags__testing",
295        "cronet_aml_url_url_jni_headers__action__testing",
296    ],
297    export_generated_headers: [
298        "cronet_aml_base_allocator_buildflags__testing",
299        "cronet_aml_base_allocator_partition_allocator_src_partition_alloc_chromecast_buildflags__testing",
300        "cronet_aml_base_allocator_partition_allocator_src_partition_alloc_chromeos_buildflags__testing",
301        "cronet_aml_base_allocator_partition_allocator_src_partition_alloc_debugging_buildflags__testing",
302        "cronet_aml_base_allocator_partition_allocator_src_partition_alloc_partition_alloc_buildflags__testing",
303        "cronet_aml_base_allocator_partition_allocator_src_partition_alloc_raw_ptr_buildflags__testing",
304        "cronet_aml_base_anchor_functions_buildflags__testing",
305        "cronet_aml_base_build_date__testing",
306        "cronet_aml_base_cfi_buildflags__testing",
307        "cronet_aml_base_check_version_internal_action__testing",
308        "cronet_aml_base_clang_profiling_buildflags__testing",
309        "cronet_aml_base_debugging_buildflags__testing",
310        "cronet_aml_base_feature_list_buildflags__testing",
311        "cronet_aml_base_fuzzing_buildflags__testing",
312        "cronet_aml_base_ios_cronet_buildflags__testing",
313        "cronet_aml_base_logging_buildflags__testing",
314        "cronet_aml_base_message_pump_buildflags__testing",
315        "cronet_aml_base_orderfile_buildflags__testing",
316        "cronet_aml_base_power_monitor_buildflags__testing",
317        "cronet_aml_base_profiler_buildflags__testing",
318        "cronet_aml_base_protected_memory_buildflags__testing",
319        "cronet_aml_base_rust_buildflags__testing",
320        "cronet_aml_base_sanitizer_buildflags__testing",
321        "cronet_aml_base_synchronization_buildflags__testing",
322        "cronet_aml_base_tracing_buildflags__testing",
323        "cronet_aml_build_blink_buildflags__testing",
324        "cronet_aml_build_branding_buildflags__testing",
325        "cronet_aml_build_chromecast_buildflags__testing",
326        "cronet_aml_build_chromeos_buildflags__testing",
327        "cronet_aml_build_config_compiler_compiler_buildflags__testing",
328        "cronet_aml_build_ios_buildflags__testing",
329        "cronet_aml_build_robolectric_buildflags__testing",
330        "cronet_aml_crypto_buildflags__testing",
331        "cronet_aml_net_base_registry_controlled_domains_registry_controlled_domains__testing",
332        "cronet_aml_net_buildflags__testing",
333        "cronet_aml_net_cronet_buildflags__testing",
334        "cronet_aml_net_isolation_info_proto_gen__testing_headers",
335        "cronet_aml_net_net_jni_headers__action__testing",
336        "cronet_aml_net_net_nqe_proto_gen__testing_headers",
337        "cronet_aml_net_third_party_quiche_net_quic_proto_gen__testing_headers",
338        "cronet_aml_net_third_party_quiche_net_quic_test_tools_proto_gen__testing_headers",
339        "cronet_aml_url_buildflags__testing",
340        "cronet_aml_url_url_jni_headers__action__testing",
341    ],
342    defaults: [
343        "cronet_aml_cc_defaults",
344    ],
345    cflags: [
346        "-DANDROID",
347        "-DANDROID_NDK_VERSION_ROLL=r26b_1",
348        "-DCR_CLANG_REVISION=\"llvmorg-19-init-8091-gab037c4f-22\"",
349        "-DCR_LIBCXX_REVISION=e3b94d0e5b86883fd77696bf10dc33ba250ba99b",
350        "-DDYNAMIC_ANNOTATIONS_ENABLED=0",
351        "-DENABLE_BUILT_IN_DNS",
352        "-DGOOGLE_PROTOBUF_INTERNAL_DONATE_STEAL_INLINE=0",
353        "-DGOOGLE_PROTOBUF_NO_RTTI",
354        "-DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER",
355        "-DHAVE_PTHREAD",
356        "-DHAVE_SYS_UIO_H",
357        "-DNDEBUG",
358        "-DNET_IMPLEMENTATION",
359        "-DNO_UNWIND_TABLES",
360        "-DNVALGRIND",
361        "-DOFFICIAL_BUILD",
362        "-D_GNU_SOURCE",
363        "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
364        "-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE",
365        "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
366        "-D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__",
367        "-D__STDC_CONSTANT_MACROS",
368        "-D__STDC_FORMAT_MACROS",
369        "-fdata-sections",
370        "-ffunction-sections",
371        "-fno-asynchronous-unwind-tables",
372        "-fno-unwind-tables",
373        "-fstack-protector",
374        "-fvisibility-inlines-hidden",
375        "-fvisibility=hidden",
376        "-g1",
377    ],
378    include_dirs: [
379        "external/cronet/",
380        "external/cronet/base/allocator/partition_allocator/src/",
381        "external/cronet/buildtools/third_party/libc++/",
382        "external/cronet/net/third_party/quiche/overrides/",
383        "external/cronet/net/third_party/quiche/src/",
384        "external/cronet/net/third_party/quiche/src/quiche/common/platform/default/",
385        "external/cronet/third_party/abseil-cpp/",
386        "external/cronet/third_party/boringssl/src/include/",
387        "external/cronet/third_party/brotli/include/",
388        "external/cronet/third_party/libc++/src/include",
389        "external/cronet/third_party/libc++abi/src/include",
390        "external/cronet/third_party/protobuf/src/",
391    ],
392    cpp_std: "c++20",
393    ldflags: [
394        "-Wl,--as-needed",
395        "-Wl,--gc-sections",
396        "-Wl,--icf=all",
397        "-Wl,--script,external/cronet/base/android/library_loader/anchor_functions.lds",
398        "-Wl,-wrap,asprintf",
399        "-Wl,-wrap,calloc",
400        "-Wl,-wrap,free",
401        "-Wl,-wrap,getcwd",
402        "-Wl,-wrap,malloc",
403        "-Wl,-wrap,malloc_usable_size",
404        "-Wl,-wrap,memalign",
405        "-Wl,-wrap,posix_memalign",
406        "-Wl,-wrap,pvalloc",
407        "-Wl,-wrap,realloc",
408        "-Wl,-wrap,realpath",
409        "-Wl,-wrap,strdup",
410        "-Wl,-wrap,strndup",
411        "-Wl,-wrap,valloc",
412        "-Wl,-wrap,vasprintf",
413    ],
414    visibility: [
415        "//external/cronet:__subpackages__",
416    ],
417    target: {
418        android_arm: {
419            cflags: [
420                "-D_FORTIFY_SOURCE=2",
421            ],
422        },
423        android_arm64: {
424            cflags: [
425                "-D_FORTIFY_SOURCE=2",
426                "-O2",
427                "-mno-outline",
428            ],
429        },
430        android_x86: {
431            cflags: [
432                "-D_FORTIFY_SOURCE=2",
433                "-msse3",
434            ],
435        },
436        android_x86_64: {
437            cflags: [
438                "-D_FORTIFY_SOURCE=2",
439                "-msse3",
440            ],
441        },
442    },
443}
444