xref: /aosp_15_r20/external/cronet/third_party/apache-portable-runtime/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_apache-portable-runtime_license",
21    ],
22}
23
24// GN: License-Artificial
25license {
26    name: "external_cronet_third_party_apache-portable-runtime_license",
27    visibility: [
28        ":__subpackages__",
29    ],
30    license_text: [
31        "LICENSE",
32    ],
33    license_kinds: [
34        "SPDX-license-identifier-Apache-2.0",
35    ],
36}
37
38// GN: //third_party/apache-portable-runtime:apr__testing
39cc_library_static {
40    name: "cronet_aml_third_party_apache_portable_runtime_apr__testing",
41    srcs: [
42        "src/atomic/unix/builtins.c",
43        "src/atomic/unix/ia32.c",
44        "src/atomic/unix/mutex.c",
45        "src/atomic/unix/ppc.c",
46        "src/atomic/unix/s390.c",
47        "src/atomic/unix/solaris.c",
48        "src/dso/unix/dso.c",
49        "src/file_io/unix/buffer.c",
50        "src/file_io/unix/copy.c",
51        "src/file_io/unix/dir.c",
52        "src/file_io/unix/fileacc.c",
53        "src/file_io/unix/filedup.c",
54        "src/file_io/unix/filepath.c",
55        "src/file_io/unix/filepath_util.c",
56        "src/file_io/unix/filestat.c",
57        "src/file_io/unix/flock.c",
58        "src/file_io/unix/fullrw.c",
59        "src/file_io/unix/mktemp.c",
60        "src/file_io/unix/open.c",
61        "src/file_io/unix/pipe.c",
62        "src/file_io/unix/readwrite.c",
63        "src/file_io/unix/seek.c",
64        "src/file_io/unix/tempdir.c",
65        "src/locks/unix/global_mutex.c",
66        "src/locks/unix/proc_mutex.c",
67        "src/locks/unix/thread_cond.c",
68        "src/locks/unix/thread_mutex.c",
69        "src/locks/unix/thread_rwlock.c",
70        "src/memory/unix/apr_pools.c",
71        "src/misc/unix/charset.c",
72        "src/misc/unix/env.c",
73        "src/misc/unix/errorcodes.c",
74        "src/misc/unix/getopt.c",
75        "src/misc/unix/otherchild.c",
76        "src/misc/unix/rand.c",
77        "src/misc/unix/start.c",
78        "src/misc/unix/version.c",
79        "src/mmap/unix/common.c",
80        "src/mmap/unix/mmap.c",
81        "src/network_io/unix/inet_ntop.c",
82        "src/network_io/unix/inet_pton.c",
83        "src/network_io/unix/multicast.c",
84        "src/network_io/unix/sendrecv.c",
85        "src/network_io/unix/sockaddr.c",
86        "src/network_io/unix/sockets.c",
87        "src/network_io/unix/sockopt.c",
88        "src/passwd/apr_getpass.c",
89        "src/poll/unix/epoll.c",
90        "src/poll/unix/kqueue.c",
91        "src/poll/unix/poll.c",
92        "src/poll/unix/pollcb.c",
93        "src/poll/unix/pollset.c",
94        "src/poll/unix/port.c",
95        "src/poll/unix/select.c",
96        "src/random/unix/apr_random.c",
97        "src/random/unix/sha2.c",
98        "src/random/unix/sha2_glue.c",
99        "src/shmem/unix/shm.c",
100        "src/strings/apr_cpystrn.c",
101        "src/strings/apr_fnmatch.c",
102        "src/strings/apr_snprintf.c",
103        "src/strings/apr_strings.c",
104        "src/strings/apr_strnatcmp.c",
105        "src/strings/apr_strtok.c",
106        "src/support/unix/waitio.c",
107        "src/tables/apr_hash.c",
108        "src/tables/apr_skiplist.c",
109        "src/tables/apr_tables.c",
110        "src/threadproc/unix/proc.c",
111        "src/threadproc/unix/procsup.c",
112        "src/threadproc/unix/signals.c",
113        "src/threadproc/unix/thread.c",
114        "src/threadproc/unix/threadpriv.c",
115        "src/time/unix/time.c",
116        "src/time/unix/timestr.c",
117        "src/user/unix/groupinfo.c",
118        "src/user/unix/userinfo.c",
119    ],
120    defaults: [
121        "cronet_aml_cc_defaults",
122    ],
123    cflags: [
124        "-DANDROID",
125        "-DANDROID_NDK_VERSION_ROLL=r26b_1",
126        "-DCR_CLANG_REVISION=\"llvmorg-19-init-8091-gab037c4f-22\"",
127        "-DCR_LIBCXX_REVISION=e3b94d0e5b86883fd77696bf10dc33ba250ba99b",
128        "-DDYNAMIC_ANNOTATIONS_ENABLED=0",
129        "-DHAVE_SYS_UIO_H",
130        "-DNDEBUG",
131        "-DNO_UNWIND_TABLES",
132        "-DNVALGRIND",
133        "-DOFFICIAL_BUILD",
134        "-DSTRERROR_R_RC_INT",
135        "-D_GNU_SOURCE",
136        "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
137        "-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE",
138        "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
139        "-D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__",
140        "-Wno-incompatible-pointer-types-discards-qualifiers",
141        "-fdata-sections",
142        "-ffunction-sections",
143        "-fno-asynchronous-unwind-tables",
144        "-fno-unwind-tables",
145        "-fstack-protector",
146        "-fvisibility-inlines-hidden",
147        "-fvisibility=hidden",
148        "-g1",
149    ],
150    include_dirs: [
151        "external/cronet/",
152        "external/cronet/buildtools/third_party/libc++/",
153        "external/cronet/third_party/apache-portable-runtime/src/include/",
154        "external/cronet/third_party/apache-portable-runtime/src/include/arch/unix/",
155        "external/cronet/third_party/libc++/src/include",
156        "external/cronet/third_party/libc++abi/src/include",
157    ],
158    cpp_std: "c++20",
159    ldflags: [
160        "-Wl,--as-needed",
161        "-Wl,--gc-sections",
162        "-Wl,--icf=all",
163    ],
164    visibility: [
165        "//external/cronet:__subpackages__",
166    ],
167    target: {
168        android_arm64: {
169            cflags: [
170                "-O2",
171                "-mno-outline",
172            ],
173        },
174        android_x86: {
175            cflags: [
176                "-msse3",
177            ],
178        },
179        android_x86_64: {
180            cflags: [
181                "-msse3",
182            ],
183        },
184    },
185}
186