xref: /aosp_15_r20/external/cronet/base/third_party/double_conversion/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_base_third_party_double_conversion_license",
21    ],
22}
23
24// GN: License-Artificial
25license {
26    name: "external_cronet_base_third_party_double_conversion_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: //base/third_party/double_conversion:double_conversion
39cc_library_static {
40    name: "cronet_aml_base_third_party_double_conversion_double_conversion",
41    srcs: [
42        "double-conversion/bignum-dtoa.cc",
43        "double-conversion/bignum.cc",
44        "double-conversion/cached-powers.cc",
45        "double-conversion/double-to-string.cc",
46        "double-conversion/fast-dtoa.cc",
47        "double-conversion/fixed-dtoa.cc",
48        "double-conversion/string-to-double.cc",
49        "double-conversion/strtod.cc",
50    ],
51    defaults: [
52        "cronet_aml_cc_defaults",
53    ],
54    cflags: [
55        "-DANDROID",
56        "-DANDROID_NDK_VERSION_ROLL=r26b_1",
57        "-DCR_CLANG_REVISION=\"llvmorg-19-init-8091-gab037c4f-22\"",
58        "-DCR_LIBCXX_REVISION=e3b94d0e5b86883fd77696bf10dc33ba250ba99b",
59        "-DDYNAMIC_ANNOTATIONS_ENABLED=0",
60        "-DHAVE_SYS_UIO_H",
61        "-DNDEBUG",
62        "-DNO_UNWIND_TABLES",
63        "-DNVALGRIND",
64        "-DOFFICIAL_BUILD",
65        "-D_GNU_SOURCE",
66        "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
67        "-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE",
68        "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
69        "-D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__",
70        "-D__STDC_CONSTANT_MACROS",
71        "-D__STDC_FORMAT_MACROS",
72        "-fdata-sections",
73        "-ffunction-sections",
74        "-fno-asynchronous-unwind-tables",
75        "-fno-unwind-tables",
76        "-fstack-protector",
77        "-fvisibility-inlines-hidden",
78        "-fvisibility=hidden",
79        "-g1",
80    ],
81    include_dirs: [
82        "external/cronet/",
83        "external/cronet/buildtools/third_party/libc++/",
84        "external/cronet/third_party/libc++/src/include",
85        "external/cronet/third_party/libc++abi/src/include",
86    ],
87    cpp_std: "c++20",
88    ldflags: [
89        "-Wl,--as-needed",
90        "-Wl,--gc-sections",
91        "-Wl,--icf=all",
92    ],
93    visibility: [
94        "//external/cronet:__subpackages__",
95    ],
96    target: {
97        android_arm: {
98            cflags: [
99                "-D_FORTIFY_SOURCE=2",
100            ],
101        },
102        android_arm64: {
103            cflags: [
104                "-D_FORTIFY_SOURCE=2",
105                "-O2",
106                "-mno-outline",
107            ],
108        },
109        android_x86: {
110            cflags: [
111                "-D_FORTIFY_SOURCE=2",
112                "-msse3",
113            ],
114        },
115        android_x86_64: {
116            cflags: [
117                "-D_FORTIFY_SOURCE=2",
118                "-msse3",
119            ],
120        },
121    },
122}
123
124// GN: //base/third_party/double_conversion:double_conversion__testing
125cc_library_static {
126    name: "cronet_aml_base_third_party_double_conversion_double_conversion__testing",
127    srcs: [
128        "double-conversion/bignum-dtoa.cc",
129        "double-conversion/bignum.cc",
130        "double-conversion/cached-powers.cc",
131        "double-conversion/double-to-string.cc",
132        "double-conversion/fast-dtoa.cc",
133        "double-conversion/fixed-dtoa.cc",
134        "double-conversion/string-to-double.cc",
135        "double-conversion/strtod.cc",
136    ],
137    host_supported: true,
138    defaults: [
139        "cronet_aml_cc_defaults",
140    ],
141    cflags: [
142        "-DCR_CLANG_REVISION=\"llvmorg-19-init-8091-gab037c4f-22\"",
143        "-DCR_LIBCXX_REVISION=e3b94d0e5b86883fd77696bf10dc33ba250ba99b",
144        "-DDYNAMIC_ANNOTATIONS_ENABLED=0",
145        "-DNDEBUG",
146        "-DNO_UNWIND_TABLES",
147        "-DNVALGRIND",
148        "-DOFFICIAL_BUILD",
149        "-D_GNU_SOURCE",
150        "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
151        "-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE",
152        "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
153        "-D__STDC_CONSTANT_MACROS",
154        "-D__STDC_FORMAT_MACROS",
155        "-fdata-sections",
156        "-ffunction-sections",
157        "-fno-asynchronous-unwind-tables",
158        "-fno-unwind-tables",
159        "-fstack-protector",
160        "-fvisibility-inlines-hidden",
161        "-fvisibility=hidden",
162        "-g1",
163    ],
164    include_dirs: [
165        "external/cronet/",
166        "external/cronet/buildtools/third_party/libc++/",
167        "external/cronet/third_party/libc++/src/include",
168        "external/cronet/third_party/libc++abi/src/include",
169    ],
170    cpp_std: "c++20",
171    ldflags: [
172        "-Wl,--as-needed",
173        "-Wl,--gc-sections",
174        "-Wl,--icf=all",
175    ],
176    visibility: [
177        "//external/cronet:__subpackages__",
178    ],
179    target: {
180        android_arm: {
181            cflags: [
182                "-DANDROID",
183                "-DANDROID_NDK_VERSION_ROLL=r26b_1",
184                "-DHAVE_SYS_UIO_H",
185                "-D_FORTIFY_SOURCE=2",
186                "-D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__",
187            ],
188        },
189        android_arm64: {
190            cflags: [
191                "-DANDROID",
192                "-DANDROID_NDK_VERSION_ROLL=r26b_1",
193                "-DHAVE_SYS_UIO_H",
194                "-D_FORTIFY_SOURCE=2",
195                "-D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__",
196                "-O2",
197                "-mno-outline",
198            ],
199        },
200        android_riscv64: {
201            cflags: [
202                "-DANDROID",
203                "-DANDROID_NDK_VERSION_ROLL=r26b_1",
204                "-DHAVE_SYS_UIO_H",
205                "-D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__",
206            ],
207        },
208        android_x86: {
209            cflags: [
210                "-DANDROID",
211                "-DANDROID_NDK_VERSION_ROLL=r26b_1",
212                "-DHAVE_SYS_UIO_H",
213                "-D_FORTIFY_SOURCE=2",
214                "-D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__",
215                "-msse3",
216            ],
217        },
218        android_x86_64: {
219            cflags: [
220                "-DANDROID",
221                "-DANDROID_NDK_VERSION_ROLL=r26b_1",
222                "-DHAVE_SYS_UIO_H",
223                "-D_FORTIFY_SOURCE=2",
224                "-D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__",
225                "-msse3",
226            ],
227        },
228        host: {
229            cflags: [
230                "-DCR_SYSROOT_KEY=20230611T210420Z-2",
231                "-DUSE_AURA=1",
232                "-DUSE_OZONE=1",
233                "-DUSE_UDEV",
234                "-D_FILE_OFFSET_BITS=64",
235                "-D_FORTIFY_SOURCE=2",
236                "-D_LARGEFILE64_SOURCE",
237                "-D_LARGEFILE_SOURCE",
238                "-O2",
239                "-msse3",
240            ],
241            compile_multilib: "64",
242        },
243    },
244}
245