• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 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: //build/rust/tests/test_rust_static_library:test_rust_static_library__testing
25rust_ffi_static {
26    name: "libbuild_srust_stests_stest_urust_ustatic_ulibrary_ctest_urust_ustatic_ulibrary__67d7e1aafc041096",
27    srcs: [
28        "src/lib.rs",
29    ],
30    host_cross_supported: false,
31    apex_available: [
32        "com.android.tethering",
33    ],
34    min_sdk_version: "30",
35    visibility: [
36        "//external/cronet:__subpackages__",
37        "//packages/modules/Connectivity:__subpackages__",
38    ],
39    crate_name: "build_srust_stests_stest_urust_ustatic_ulibrary_ctest_urust_ustatic_ulibrary",
40    crate_root: "src/lib.rs",
41    rustlibs: [
42        "libchromium__eb6193a5492aad4d",
43        "libcxx__20522d26522c8543",
44    ],
45    target: {
46        android_arm: {
47            edition: "2021",
48            cfgs: [
49                "cr_rustc_revision=\"a522d78598415cdd614ccc6d961160f192f64b5c-1-llvmorg-20-init-13894-g8cb44859\"",
50            ],
51            flags: [
52                "-Dunsafe_op_in_unsafe_fn",
53                "-Dwarnings",
54                "-Aunused-imports",
55                "-Cforce-unwind-tables=yes",
56                "-Crelocation-model=pic",
57                "-Coverflow-checks=on",
58                "-Cdefault-linker-libraries",
59                "-Clto=no",
60                "-Ccodegen-units=1",
61                "-Copt-level=s",
62                "-Cdebuginfo=1",
63            ],
64        },
65        android_arm64: {
66            edition: "2021",
67            cfgs: [
68                "cr_rustc_revision=\"a522d78598415cdd614ccc6d961160f192f64b5c-1-llvmorg-20-init-13894-g8cb44859\"",
69            ],
70            flags: [
71                "-Dunsafe_op_in_unsafe_fn",
72                "-Dwarnings",
73                "-Aunused-imports",
74                "-Cforce-unwind-tables=yes",
75                "-Crelocation-model=pic",
76                "-Coverflow-checks=on",
77                "-Cdefault-linker-libraries",
78                "-Clto=no",
79                "-Ccodegen-units=1",
80                "-Copt-level=3",
81                "-Cdebuginfo=1",
82            ],
83        },
84        android_riscv64: {
85            edition: "2021",
86            cfgs: [
87                "cr_rustc_revision=\"a522d78598415cdd614ccc6d961160f192f64b5c-1-llvmorg-20-init-13894-g8cb44859\"",
88            ],
89            flags: [
90                "-Dunsafe_op_in_unsafe_fn",
91                "-Dwarnings",
92                "-Aunused-imports",
93                "-Cforce-unwind-tables=yes",
94                "-Crelocation-model=pic",
95                "-Coverflow-checks=on",
96                "-Cdefault-linker-libraries",
97                "-Clto=no",
98                "-Ccodegen-units=1",
99                "-Copt-level=s",
100                "-Cdebuginfo=1",
101            ],
102        },
103        android_x86: {
104            edition: "2021",
105            cfgs: [
106                "cr_rustc_revision=\"a522d78598415cdd614ccc6d961160f192f64b5c-1-llvmorg-20-init-13894-g8cb44859\"",
107            ],
108            flags: [
109                "-Dunsafe_op_in_unsafe_fn",
110                "-Dwarnings",
111                "-Aunused-imports",
112                "-Cforce-unwind-tables=yes",
113                "-Crelocation-model=pic",
114                "-Coverflow-checks=on",
115                "-Cdefault-linker-libraries",
116                "-Clto=no",
117                "-Ccodegen-units=1",
118                "-Copt-level=s",
119                "-Cdebuginfo=1",
120            ],
121        },
122        android_x86_64: {
123            edition: "2021",
124            cfgs: [
125                "cr_rustc_revision=\"a522d78598415cdd614ccc6d961160f192f64b5c-1-llvmorg-20-init-13894-g8cb44859\"",
126            ],
127            flags: [
128                "-Dunsafe_op_in_unsafe_fn",
129                "-Dwarnings",
130                "-Aunused-imports",
131                "-Cforce-unwind-tables=yes",
132                "-Crelocation-model=pic",
133                "-Coverflow-checks=on",
134                "-Cdefault-linker-libraries",
135                "-Clto=no",
136                "-Ccodegen-units=1",
137                "-Copt-level=3",
138                "-Cdebuginfo=1",
139            ],
140        },
141        host: {
142            compile_multilib: "64",
143        },
144    },
145}
146
147// GN: //build/rust/tests/test_rust_static_library:test_rust_static_library_cxx_generated__testing
148cc_library_static {
149    name: "stable_cronet_build_rust_tests_test_rust_static_library_test_rust_static_library_cxx_generated__testing",
150    srcs: [
151        ":stable_cronet_build_rust_tests_test_rust_static_library_test_rust_static_library_cxx_generated_gen__testing",
152    ],
153    host_cross_supported: false,
154    generated_headers: [
155        "stable_cronet_build_rust_tests_test_rust_static_library_test_rust_static_library_cxx_generated_gen__testing_header",
156    ],
157    export_generated_headers: [
158        "stable_cronet_build_rust_tests_test_rust_static_library_test_rust_static_library_cxx_generated_gen__testing_header",
159    ],
160    defaults: [
161        "stable_cronet_cc_defaults",
162    ],
163    cflags: [
164        "-DANDROID",
165        "-DANDROID_NDK_VERSION_ROLL=r27_1",
166        "-DCR_CLANG_REVISION=\"llvmorg-20-init-13894-g8cb44859-1\"",
167        "-DCR_CXX_INCLUDE=\"third_party/rust/chromium_crates_io/vendor/cxx-1.0.130/include/cxx.h\"",
168        "-DCR_LIBCXX_REVISION=6a91009985a46122b061d36bb27f2c94f99126df",
169        "-DDYNAMIC_ANNOTATIONS_ENABLED=0",
170        "-DHAVE_SYS_UIO_H",
171        "-DNDEBUG",
172        "-DNVALGRIND",
173        "-DOFFICIAL_BUILD",
174        "-DTMP_REBUILD_HACK",
175        "-D_GNU_SOURCE",
176        "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
177        "-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE",
178        "-D_LIBCPP_INSTRUMENTED_WITH_ASAN=0",
179        "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
180        "-D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__",
181        "-D__STDC_CONSTANT_MACROS",
182        "-D__STDC_FORMAT_MACROS",
183        "-fdata-sections",
184        "-ffunction-sections",
185        "-fstack-protector",
186        "-fvisibility-inlines-hidden",
187        "-fvisibility=hidden",
188        "-g1",
189    ],
190    include_dirs: [
191        "external/cronet/stable/",
192        "external/cronet/stable/buildtools/third_party/libc++/",
193        "external/cronet/stable/third_party/libc++/src/include",
194        "external/cronet/stable/third_party/libc++abi/src/include",
195    ],
196    cpp_std: "c++20",
197    ldflags: [
198        "-Wl,--as-needed",
199        "-Wl,--gc-sections",
200        "-Wl,--icf=all",
201    ],
202    visibility: [
203        "//external/cronet:__subpackages__",
204    ],
205    target: {
206        android_arm: {
207            cflags: [
208                "-D_FORTIFY_SOURCE=2",
209            ],
210        },
211        android_arm64: {
212            cflags: [
213                "-D_FORTIFY_SOURCE=2",
214                "-D__ARM_NEON__=1",
215                "-O2",
216                "-mno-outline",
217            ],
218        },
219        android_x86: {
220            cflags: [
221                "-D_FORTIFY_SOURCE=2",
222                "-msse3",
223            ],
224        },
225        android_x86_64: {
226            cflags: [
227                "-D_FORTIFY_SOURCE=2",
228                "-O2",
229                "-msse3",
230            ],
231        },
232    },
233}
234