aboutsummaryrefslogtreecommitdiff
path: root/utils/bazel/WORKSPACE
diff options
context:
space:
mode:
authorJordan Rupprecht <rupprecht@google.com>2022-12-28 08:13:20 -0800
committerJordan Rupprecht <rupprecht@google.com>2022-12-28 08:13:20 -0800
commit4aa77690b98e564c598505749d4eb57b9a8be32c (patch)
tree49fe85e2b311a7425b3028fcdb484b697a167e7a /utils/bazel/WORKSPACE
parent243b1e97d6cdc36d94f422e9f273c97054520d2e (diff)
downloadllvm-4aa77690b98e564c598505749d4eb57b9a8be32c.zip
llvm-4aa77690b98e564c598505749d4eb57b9a8be32c.tar.gz
llvm-4aa77690b98e564c598505749d4eb57b9a8be32c.tar.bz2
[bazel] Restore libpfm as a conditional dependency for exegesis.
We used to have `pfm` built into exegesis, although since it's an external dependency we marked it as a manual target. Because of this we didn't have buildbot coverage and so we removed it in D134510 after we had a few breakages that weren't caught. This adds it back, but with three possible states similar to the story with `mpfr`, i.e. it can either be disabled, built from external sources (git/make), or use whatever `-lpfm` is installed on the system. This change is modeled after D119547. Like that patch, the default is off (matching the status quo), but unlike that patch we don't enable it for CI because IIRC we don't have the package installed there, and building from source might be expensive. We could enable it later either after installing it on buildbot machines or by measuring build cost and deeming it OK. Reviewed By: GMNGeoffrey Differential Revision: https://reviews.llvm.org/D138470
Diffstat (limited to 'utils/bazel/WORKSPACE')
-rw-r--r--utils/bazel/WORKSPACE14
1 files changed, 11 insertions, 3 deletions
diff --git a/utils/bazel/WORKSPACE b/utils/bazel/WORKSPACE
index 337b9ce7..37bc155 100644
--- a/utils/bazel/WORKSPACE
+++ b/utils/bazel/WORKSPACE
@@ -4,7 +4,7 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
-load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
+load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository", "new_git_repository")
SKYLIB_VERSION = "1.3.0"
@@ -19,8 +19,8 @@ http_archive(
new_local_repository(
name = "llvm-raw",
- path = "../../",
build_file_content = "# empty",
+ path = "../../",
)
load("@llvm-raw//utils/bazel:configure.bzl", "llvm_configure")
@@ -81,11 +81,12 @@ maybe(
git_repository(
name = "rules_foreign_cc",
+ remote = "https://github.com/bazelbuild/rules_foreign_cc.git",
tag = "0.9.0",
- remote = "https://github.com/bazelbuild/rules_foreign_cc.git"
)
load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies")
+
rules_foreign_cc_dependencies()
maybe(
@@ -110,3 +111,10 @@ maybe(
urls = ["https://www.mpfr.org/mpfr-current/mpfr-4.1.1.tar.gz"],
)
+maybe(
+ new_git_repository,
+ name = "pfm",
+ build_file = "@llvm-raw//utils/bazel/third_party_build:pfm.BUILD",
+ remote = "https://git.code.sf.net/p/perfmon2/libpfm4",
+ tag = "v4.12.1",
+)