xref: /aosp_15_r20/external/cronet/third_party/google_benchmark/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_google_benchmark_license",
21    ],
22}
23
24// GN: License-Artificial
25license {
26    name: "external_cronet_third_party_google_benchmark_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/google_benchmark:google_benchmark__testing
39cc_library_static {
40    name: "cronet_aml_third_party_google_benchmark_google_benchmark__testing",
41    srcs: [
42        "src/src/benchmark.cc",
43        "src/src/benchmark_api_internal.cc",
44        "src/src/benchmark_name.cc",
45        "src/src/benchmark_register.cc",
46        "src/src/benchmark_runner.cc",
47        "src/src/check.cc",
48        "src/src/colorprint.cc",
49        "src/src/commandlineflags.cc",
50        "src/src/complexity.cc",
51        "src/src/console_reporter.cc",
52        "src/src/counter.cc",
53        "src/src/csv_reporter.cc",
54        "src/src/json_reporter.cc",
55        "src/src/perf_counters.cc",
56        "src/src/reporter.cc",
57        "src/src/statistics.cc",
58        "src/src/string_util.cc",
59        "src/src/sysinfo.cc",
60        "src/src/timers.cc",
61    ],
62    defaults: [
63        "cronet_aml_cc_defaults",
64    ],
65    cflags: [
66        "-DANDROID",
67        "-DANDROID_NDK_VERSION_ROLL=r26b_1",
68        "-DBENCHMARK_STATIC_DEFINE",
69        "-DBENCHMARK_VERSION=\"1.8.3\"",
70        "-DCR_CLANG_REVISION=\"llvmorg-19-init-8091-gab037c4f-22\"",
71        "-DCR_LIBCXX_REVISION=e3b94d0e5b86883fd77696bf10dc33ba250ba99b",
72        "-DDYNAMIC_ANNOTATIONS_ENABLED=0",
73        "-DHAVE_STD_REGEX=1",
74        "-DHAVE_SYS_UIO_H",
75        "-DNDEBUG",
76        "-DNO_UNWIND_TABLES",
77        "-DNVALGRIND",
78        "-DOFFICIAL_BUILD",
79        "-D_GNU_SOURCE",
80        "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS",
81        "-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE",
82        "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS",
83        "-D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__",
84        "-Dbenchmark_EXPORTS=1",
85        "-fdata-sections",
86        "-ffunction-sections",
87        "-fno-asynchronous-unwind-tables",
88        "-fno-unwind-tables",
89        "-fstack-protector",
90        "-fvisibility-inlines-hidden",
91        "-fvisibility=hidden",
92        "-g1",
93    ],
94    include_dirs: [
95        "external/cronet/",
96        "external/cronet/buildtools/third_party/libc++/",
97        "external/cronet/third_party/google_benchmark/src/include/",
98        "external/cronet/third_party/libc++/src/include",
99        "external/cronet/third_party/libc++abi/src/include",
100    ],
101    cpp_std: "c++20",
102    ldflags: [
103        "-Wl,--as-needed",
104        "-Wl,--gc-sections",
105        "-Wl,--icf=all",
106    ],
107    visibility: [
108        "//external/cronet:__subpackages__",
109    ],
110    target: {
111        android_arm64: {
112            cflags: [
113                "-O2",
114                "-mno-outline",
115            ],
116        },
117        android_x86: {
118            cflags: [
119                "-msse3",
120            ],
121        },
122        android_x86_64: {
123            cflags: [
124                "-msse3",
125            ],
126        },
127    },
128}
129