blob: 12f4940627ee4ffbe1cd4ef74266636ead9047c4 [file] [log] [blame]
Colin Cross2722ebb2016-07-11 16:20:06 -07001//
2// Copyright (C) 2013 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17cc_defaults {
18 name: "bionic-benchmarks-defaults",
19 cflags: [
20 "-O2",
21 "-fno-builtin",
22 "-Wall",
23 "-Wextra",
24 "-Werror",
25 "-Wunused",
26 ],
27 srcs: [
28 "math_benchmark.cpp",
29 "property_benchmark.cpp",
30 "pthread_benchmark.cpp",
31 "semaphore_benchmark.cpp",
32 "stdio_benchmark.cpp",
33 "string_benchmark.cpp",
34 "time_benchmark.cpp",
35 "unistd_benchmark.cpp",
36 ],
37}
38
39// Build benchmarks for the device (with bionic's .so). Run with:
40// adb shell bionic-benchmarks32
41// adb shell bionic-benchmarks64
42cc_benchmark {
43 name: "bionic-benchmarks",
44 defaults: ["bionic-benchmarks-defaults"],
45}
46
47// We don't build a static benchmark executable because it's not usually
48// useful. If you're trying to run the current benchmarks on an older
49// release, it's (so far at least) always because you want to measure the
50// performance of the old release's libc, and a static benchmark isn't
51// going to let you do that.
52
53// Build benchmarks for the host (against glibc!). Run with:
54cc_benchmark_host {
55 name: "bionic-benchmarks-glibc",
56 defaults: ["bionic-benchmarks-defaults"],
57 host_ldlibs: ["-lrt"],
58 target: {
59 darwin: {
60 // Only supported on linux systems.
61 enabled: false,
62 },
63 },
64}