xref: /aosp_15_r20/external/cronet/third_party/ashmem/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_ashmem_license",
21    ],
22}
23
24// GN: License-Artificial
25license {
26    name: "external_cronet_third_party_ashmem_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/ashmem:ashmem
39cc_library_static {
40    name: "cronet_aml_third_party_ashmem_ashmem",
41    srcs: [
42        "ashmem-dev.c",
43    ],
44    defaults: [
45        "cronet_aml_cc_defaults",
46    ],
47    cflags: [
48        "-DANDROID",
49        "-DANDROID_NDK_VERSION_ROLL=r26b_1",
50        "-DCR_CLANG_REVISION=\"llvmorg-19-init-8091-gab037c4f-22\"",
51        "-DCR_LIBCXX_REVISION=e3b94d0e5b86883fd77696bf10dc33ba250ba99b",
52        "-DDYNAMIC_ANNOTATIONS_ENABLED=0",
53        "-DHAVE_SYS_UIO_H",
54        "-DNDEBUG",
55        "-DNO_UNWIND_TABLES",
56        "-DNVALGRIND",
57        "-DOFFICIAL_BUILD",
58        "-D_GNU_SOURCE",
59        "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
60        "-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE",
61        "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
62        "-D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__",
63        "-D__STDC_CONSTANT_MACROS",
64        "-D__STDC_FORMAT_MACROS",
65        "-fdata-sections",
66        "-ffunction-sections",
67        "-fno-asynchronous-unwind-tables",
68        "-fno-unwind-tables",
69        "-fstack-protector",
70        "-fvisibility-inlines-hidden",
71        "-fvisibility=hidden",
72        "-g1",
73    ],
74    include_dirs: [
75        "external/cronet/",
76        "external/cronet/buildtools/third_party/libc++/",
77        "external/cronet/third_party/libc++/src/include",
78        "external/cronet/third_party/libc++abi/src/include",
79    ],
80    cpp_std: "c++20",
81    ldflags: [
82        "-Wl,--as-needed",
83        "-Wl,--gc-sections",
84        "-Wl,--icf=all",
85    ],
86    visibility: [
87        "//external/cronet:__subpackages__",
88    ],
89    target: {
90        android_arm: {
91            cflags: [
92                "-D_FORTIFY_SOURCE=2",
93            ],
94        },
95        android_arm64: {
96            cflags: [
97                "-D_FORTIFY_SOURCE=2",
98                "-O2",
99                "-mno-outline",
100            ],
101        },
102        android_x86: {
103            cflags: [
104                "-D_FORTIFY_SOURCE=2",
105                "-msse3",
106            ],
107        },
108        android_x86_64: {
109            cflags: [
110                "-D_FORTIFY_SOURCE=2",
111                "-msse3",
112            ],
113        },
114    },
115}
116
117// GN: //third_party/ashmem:ashmem__testing
118cc_library_static {
119    name: "cronet_aml_third_party_ashmem_ashmem__testing",
120    srcs: [
121        "ashmem-dev.c",
122    ],
123    defaults: [
124        "cronet_aml_cc_defaults",
125    ],
126    cflags: [
127        "-DANDROID",
128        "-DANDROID_NDK_VERSION_ROLL=r26b_1",
129        "-DCR_CLANG_REVISION=\"llvmorg-19-init-8091-gab037c4f-22\"",
130        "-DCR_LIBCXX_REVISION=e3b94d0e5b86883fd77696bf10dc33ba250ba99b",
131        "-DDYNAMIC_ANNOTATIONS_ENABLED=0",
132        "-DHAVE_SYS_UIO_H",
133        "-DNDEBUG",
134        "-DNO_UNWIND_TABLES",
135        "-DNVALGRIND",
136        "-DOFFICIAL_BUILD",
137        "-D_GNU_SOURCE",
138        "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
139        "-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE",
140        "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
141        "-D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__",
142        "-D__STDC_CONSTANT_MACROS",
143        "-D__STDC_FORMAT_MACROS",
144        "-fdata-sections",
145        "-ffunction-sections",
146        "-fno-asynchronous-unwind-tables",
147        "-fno-unwind-tables",
148        "-fstack-protector",
149        "-fvisibility-inlines-hidden",
150        "-fvisibility=hidden",
151        "-g1",
152    ],
153    include_dirs: [
154        "external/cronet/",
155        "external/cronet/buildtools/third_party/libc++/",
156        "external/cronet/third_party/libc++/src/include",
157        "external/cronet/third_party/libc++abi/src/include",
158    ],
159    cpp_std: "c++20",
160    ldflags: [
161        "-Wl,--as-needed",
162        "-Wl,--gc-sections",
163        "-Wl,--icf=all",
164    ],
165    visibility: [
166        "//external/cronet:__subpackages__",
167    ],
168    target: {
169        android_arm: {
170            cflags: [
171                "-D_FORTIFY_SOURCE=2",
172            ],
173        },
174        android_arm64: {
175            cflags: [
176                "-D_FORTIFY_SOURCE=2",
177                "-O2",
178                "-mno-outline",
179            ],
180        },
181        android_x86: {
182            cflags: [
183                "-D_FORTIFY_SOURCE=2",
184                "-msse3",
185            ],
186        },
187        android_x86_64: {
188            cflags: [
189                "-D_FORTIFY_SOURCE=2",
190                "-msse3",
191            ],
192        },
193    },
194}
195