• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1licenses(["notice"])
2
3exports_files(["LICENSE"])
4
5cc_library(
6    name = "benchmark",
7    srcs = glob(["src/*.h", "src/*.cc",]),
8    hdrs = glob(["include/benchmark/*.h"]),
9    copts = [
10        "-DHAVE_POSIX_REGEX",
11        "-Wno-deprecated-declarations",
12    ],
13    linkopts = select({
14        ":linux_x86_64": ["-lm"],
15        ":linux_arm64": ["-lm"],
16        ":android": ["-lm"],
17        "//conditions:default": [],
18    }),
19    includes = ["include"],
20    visibility = ["//visibility:public"],
21)
22
23config_setting(
24    name = "linux_x86_64",
25    values = {"cpu": "k8"},
26    visibility = ["//visibility:public"],
27)
28
29config_setting(
30    name = "linux_arm64",
31    values = {"cpu": "aarch64"},
32    visibility = ["//visibility:public"],
33)
34
35config_setting(
36    name = "android",
37    values = {
38        "crosstool_top": "//external:android/crosstool",
39    },
40    visibility = ["//visibility:public"],
41)
42