1 // 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 17 cc_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 "atomic_benchmark.cpp", 29 "math_benchmark.cpp", 30 "property_benchmark.cpp", 31 "pthread_benchmark.cpp", 32 "semaphore_benchmark.cpp", 33 "stdio_benchmark.cpp", 34 "string_benchmark.cpp", 35 "time_benchmark.cpp", 36 "unistd_benchmark.cpp", 37 ], 38 } 39 40 // Build benchmarks for the device (with bionic's .so). Run with: 41 // adb shell bionic-benchmarks32 42 // adb shell bionic-benchmarks64 43 cc_benchmark { 44 name: "bionic-benchmarks", 45 defaults: ["bionic-benchmarks-defaults"], 46 } 47 48 // We don't build a static benchmark executable because it's not usually 49 // useful. If you're trying to run the current benchmarks on an older 50 // release, it's (so far at least) always because you want to measure the 51 // performance of the old release's libc, and a static benchmark isn't 52 // going to let you do that. 53 54 // Build benchmarks for the host (against glibc!). Run with: 55 cc_benchmark_host { 56 name: "bionic-benchmarks-glibc", 57 defaults: ["bionic-benchmarks-defaults"], 58 host_ldlibs: ["-lrt"], 59 target: { 60 darwin: { 61 // Only supported on linux systems. 62 enabled: false, 63 }, 64 }, 65 } 66