You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 line
2.9 KiB

3 週之前
  1. load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
  2. load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository")
  3. def benchmark_deps():
  4. """Loads dependencies required to build Google Benchmark."""
  5. if "bazel_skylib" not in native.existing_rules():
  6. http_archive(
  7. name = "bazel_skylib",
  8. sha256 = "f7be3474d42aae265405a592bb7da8e171919d74c16f082a5457840f06054728",
  9. urls = [
  10. "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.2.1/bazel-skylib-1.2.1.tar.gz",
  11. "https://github.com/bazelbuild/bazel-skylib/releases/download/1.2.1/bazel-skylib-1.2.1.tar.gz",
  12. ],
  13. )
  14. if "rules_foreign_cc" not in native.existing_rules():
  15. http_archive(
  16. name = "rules_foreign_cc",
  17. sha256 = "bcd0c5f46a49b85b384906daae41d277b3dc0ff27c7c752cc51e43048a58ec83",
  18. strip_prefix = "rules_foreign_cc-0.7.1",
  19. url = "https://github.com/bazelbuild/rules_foreign_cc/archive/0.7.1.tar.gz",
  20. )
  21. if "rules_python" not in native.existing_rules():
  22. http_archive(
  23. name = "rules_python",
  24. url = "https://github.com/bazelbuild/rules_python/releases/download/0.1.0/rules_python-0.1.0.tar.gz",
  25. sha256 = "b6d46438523a3ec0f3cead544190ee13223a52f6a6765a29eae7b7cc24cc83a0",
  26. )
  27. if "com_google_absl" not in native.existing_rules():
  28. http_archive(
  29. name = "com_google_absl",
  30. sha256 = "f41868f7a938605c92936230081175d1eae87f6ea2c248f41077c8f88316f111",
  31. strip_prefix = "abseil-cpp-20200225.2",
  32. urls = ["https://github.com/abseil/abseil-cpp/archive/20200225.2.tar.gz"],
  33. )
  34. if "com_google_googletest" not in native.existing_rules():
  35. new_git_repository(
  36. name = "com_google_googletest",
  37. remote = "https://github.com/google/googletest.git",
  38. tag = "release-1.11.0",
  39. )
  40. if "nanobind" not in native.existing_rules():
  41. new_git_repository(
  42. name = "nanobind",
  43. remote = "https://github.com/wjakob/nanobind.git",
  44. commit = "1ffbfe836c9dac599496a170274ee0075094a607", # v0.2.0
  45. shallow_since = "1677873085 +0100",
  46. build_file = "@//bindings/python:nanobind.BUILD",
  47. recursive_init_submodules = True,
  48. )
  49. if "libpfm" not in native.existing_rules():
  50. # Downloaded from v4.9.0 tag at https://sourceforge.net/p/perfmon2/libpfm4/ref/master/tags/
  51. http_archive(
  52. name = "libpfm",
  53. build_file = str(Label("//tools:libpfm.BUILD.bazel")),
  54. sha256 = "5da5f8872bde14b3634c9688d980f68bda28b510268723cc12973eedbab9fecc",
  55. type = "tar.gz",
  56. strip_prefix = "libpfm-4.11.0",
  57. urls = ["https://sourceforge.net/projects/perfmon2/files/libpfm4/libpfm-4.11.0.tar.gz/download"],
  58. )