• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1load("//bindings/python:build_defs.bzl", "py_extension")
2
3py_library(
4    name = "google_benchmark",
5    srcs = ["__init__.py"],
6    visibility = ["//visibility:public"],
7    deps = [
8        ":_benchmark",
9        # pip; absl:app
10    ],
11)
12
13py_extension(
14    name = "_benchmark",
15    srcs = ["benchmark.cc"],
16    copts = [
17        "-fexceptions",
18        "-fno-strict-aliasing",
19    ],
20    features = ["-use_header_modules"],
21    deps = [
22        "//:benchmark",
23        "@pybind11",
24        "@python_headers",
25    ],
26)
27
28py_test(
29    name = "example",
30    srcs = ["example.py"],
31    python_version = "PY3",
32    srcs_version = "PY3",
33    visibility = ["//visibility:public"],
34    deps = [
35        ":google_benchmark",
36    ],
37)
38
39