xref: /aosp_15_r20/external/cronet/third_party/re2/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_re2_license",
21    ],
22}
23
24// GN: License-Artificial
25license {
26    name: "external_cronet_third_party_re2_license",
27    visibility: [
28        ":__subpackages__",
29    ],
30    license_text: [
31        "LICENSE",
32    ],
33    license_kinds: [
34        "SPDX-license-identifier-BSD-3-Clause",
35    ],
36}
37
38// GN: //third_party/re2:re2__testing
39cc_library_static {
40    name: "cronet_aml_third_party_re2_re2__testing",
41    srcs: [
42        "src/re2/bitmap256.cc",
43        "src/re2/bitstate.cc",
44        "src/re2/compile.cc",
45        "src/re2/dfa.cc",
46        "src/re2/filtered_re2.cc",
47        "src/re2/mimics_pcre.cc",
48        "src/re2/nfa.cc",
49        "src/re2/onepass.cc",
50        "src/re2/parse.cc",
51        "src/re2/perl_groups.cc",
52        "src/re2/prefilter.cc",
53        "src/re2/prefilter_tree.cc",
54        "src/re2/prog.cc",
55        "src/re2/re2.cc",
56        "src/re2/regexp.cc",
57        "src/re2/set.cc",
58        "src/re2/simplify.cc",
59        "src/re2/tostring.cc",
60        "src/re2/unicode_casefold.cc",
61        "src/re2/unicode_groups.cc",
62        "src/util/rune.cc",
63        "src/util/strutil.cc",
64    ],
65    shared_libs: [
66        "liblog",
67    ],
68    generated_headers: [
69        "cronet_aml_build_chromeos_buildflags__testing",
70    ],
71    export_generated_headers: [
72        "cronet_aml_build_chromeos_buildflags__testing",
73    ],
74    defaults: [
75        "cronet_aml_cc_defaults",
76    ],
77    cflags: [
78        "-DANDROID",
79        "-DANDROID_NDK_VERSION_ROLL=r26b_1",
80        "-DCR_CLANG_REVISION=\"llvmorg-19-init-8091-gab037c4f-22\"",
81        "-DCR_LIBCXX_REVISION=e3b94d0e5b86883fd77696bf10dc33ba250ba99b",
82        "-DDYNAMIC_ANNOTATIONS_ENABLED=0",
83        "-DHAVE_SYS_UIO_H",
84        "-DNDEBUG",
85        "-DNO_UNWIND_TABLES",
86        "-DNVALGRIND",
87        "-DOFFICIAL_BUILD",
88        "-D_GNU_SOURCE",
89        "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
90        "-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE",
91        "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
92        "-D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__",
93        "-fdata-sections",
94        "-ffunction-sections",
95        "-fno-asynchronous-unwind-tables",
96        "-fno-unwind-tables",
97        "-fstack-protector",
98        "-fvisibility-inlines-hidden",
99        "-fvisibility=hidden",
100        "-g1",
101    ],
102    include_dirs: [
103        "external/cronet/",
104        "external/cronet/buildtools/third_party/libc++/",
105        "external/cronet/third_party/abseil-cpp/",
106        "external/cronet/third_party/libc++/src/include",
107        "external/cronet/third_party/libc++abi/src/include",
108        "external/cronet/third_party/re2/src/",
109    ],
110    cpp_std: "c++20",
111    ldflags: [
112        "-Wl,--as-needed",
113        "-Wl,--gc-sections",
114        "-Wl,--icf=all",
115    ],
116    visibility: [
117        "//external/cronet:__subpackages__",
118    ],
119    target: {
120        android_arm64: {
121            cflags: [
122                "-O2",
123                "-mno-outline",
124            ],
125        },
126        android_x86: {
127            cflags: [
128                "-msse3",
129            ],
130        },
131        android_x86_64: {
132            cflags: [
133                "-msse3",
134            ],
135        },
136    },
137}
138