[llvm] [Bazel]: Pull from Bazel-Central-Registry for third party deps. (PR #197316)

via llvm-commits llvm-commits at lists.llvm.org
Fri May 22 07:59:08 PDT 2026


https://github.com/UebelAndre updated https://github.com/llvm/llvm-project/pull/197316

>From 7c32e2d046ed6f20fe2a4917ab97a39e69ce7e46 Mon Sep 17 00:00:00 2001
From: UebelAndre <github at uebelandre.com>
Date: Tue, 12 May 2026 11:48:43 -0700
Subject: [PATCH] [Bazel]: Pull from Bazel-Central-Registry for third party
 deps.

---
 utils/bazel/MODULE.bazel                      |  14 +--
 utils/bazel/MODULE.bazel.lock                 | 118 ++++++------------
 utils/bazel/extensions.bzl                    |  86 +++----------
 .../llvm-project-overlay/libc/BUILD.bazel     |  24 +++-
 .../libc/utils/MPCWrapper/BUILD.bazel         |   4 +-
 .../libc/utils/MPFRWrapper/BUILD.bazel        |   4 +-
 .../llvm-project-overlay/llvm/BUILD.bazel     |  14 ++-
 utils/bazel/third_party_build/BUILD.bazel     |   5 -
 utils/bazel/third_party_build/gmp.BUILD       |  20 ---
 utils/bazel/third_party_build/mpc.BUILD       |  34 -----
 utils/bazel/third_party_build/mpfr.BUILD      |  34 -----
 utils/bazel/third_party_build/nanobind.BUILD  |  37 ------
 utils/bazel/third_party_build/pfm.BUILD       |  43 -------
 utils/bazel/third_party_build/pyyaml.BUILD    |  16 ---
 utils/bazel/third_party_build/robin_map.BUILD |  14 ---
 .../third_party_build/vulkan_headers.BUILD    |  32 -----
 utils/bazel/third_party_build/zlib-ng.BUILD   | 105 ----------------
 utils/bazel/third_party_build/zstd.BUILD      |  44 -------
 18 files changed, 92 insertions(+), 556 deletions(-)
 delete mode 100644 utils/bazel/third_party_build/BUILD.bazel
 delete mode 100644 utils/bazel/third_party_build/gmp.BUILD
 delete mode 100644 utils/bazel/third_party_build/mpc.BUILD
 delete mode 100644 utils/bazel/third_party_build/mpfr.BUILD
 delete mode 100644 utils/bazel/third_party_build/nanobind.BUILD
 delete mode 100644 utils/bazel/third_party_build/pfm.BUILD
 delete mode 100644 utils/bazel/third_party_build/pyyaml.BUILD
 delete mode 100644 utils/bazel/third_party_build/robin_map.BUILD
 delete mode 100644 utils/bazel/third_party_build/vulkan_headers.BUILD
 delete mode 100644 utils/bazel/third_party_build/zlib-ng.BUILD
 delete mode 100644 utils/bazel/third_party_build/zstd.BUILD

diff --git a/utils/bazel/MODULE.bazel b/utils/bazel/MODULE.bazel
index dac9ffc832279..c8fd617881370 100644
--- a/utils/bazel/MODULE.bazel
+++ b/utils/bazel/MODULE.bazel
@@ -12,24 +12,22 @@ bazel_dep(name = "platforms", version = "1.0.0")
 bazel_dep(name = "protobuf", version = "31.1", repo_name = "com_google_protobuf")
 bazel_dep(name = "rules_android", version = "0.6.6")
 bazel_dep(name = "rules_cc", version = "0.2.11")
-bazel_dep(name = "rules_foreign_cc", version = "0.15.1")
 bazel_dep(name = "rules_python", version = "1.9.0")
 bazel_dep(name = "rules_shell", version = "0.6.1")
 bazel_dep(name = "zlib-ng", version = "2.0.7", repo_name = "llvm_zlib")
 bazel_dep(name = "zstd", version = "1.5.7", repo_name = "llvm_zstd")
+bazel_dep(name = "gmp", version = "6.3.0.bcr.1")
+bazel_dep(name = "mpc", version = "1.4.1.bcr.2")
+bazel_dep(name = "mpfr", version = "4.2.2")
+bazel_dep(name = "nanobind", version = "2.12.0.bcr.1")
+bazel_dep(name = "libpfm", version = "4.13.0", repo_name = "pfm")
+bazel_dep(name = "vulkan_headers", version = "1.4.349")
 
 llvm_repos_extension = use_extension(":extensions.bzl", "llvm_repos_extension")
 use_repo(
     llvm_repos_extension,
-    "gmp",
     "llvm-raw",
-    "mpc",
-    "mpfr",
-    "nanobind",
-    "pfm",
     "pyyaml",
-    "robin_map",
-    "vulkan_headers",
     "vulkan_sdk",
 )
 
diff --git a/utils/bazel/MODULE.bazel.lock b/utils/bazel/MODULE.bazel.lock
index cefb2caa4abba..c7f21d6c86484 100644
--- a/utils/bazel/MODULE.bazel.lock
+++ b/utils/bazel/MODULE.bazel.lock
@@ -33,8 +33,9 @@
     "https://bcr.bazel.build/modules/bazel_features/1.28.0/MODULE.bazel": "4b4200e6cbf8fa335b2c3f43e1d6ef3e240319c33d43d60cc0fbd4b87ece299d",
     "https://bcr.bazel.build/modules/bazel_features/1.3.0/MODULE.bazel": "cdcafe83ec318cda34e02948e81d790aab8df7a929cec6f6969f13a489ccecd9",
     "https://bcr.bazel.build/modules/bazel_features/1.30.0/MODULE.bazel": "a14b62d05969a293b80257e72e597c2da7f717e1e69fa8b339703ed6731bec87",
-    "https://bcr.bazel.build/modules/bazel_features/1.30.0/source.json": "b07e17f067fe4f69f90b03b36ef1e08fe0d1f3cac254c1241a1818773e3423bc",
     "https://bcr.bazel.build/modules/bazel_features/1.4.1/MODULE.bazel": "e45b6bb2350aff3e442ae1111c555e27eac1d915e77775f6fdc4b351b758b5d7",
+    "https://bcr.bazel.build/modules/bazel_features/1.43.0/MODULE.bazel": "defa2226f06ba20550d6548c3a2ea2a7929634437a52973869c20c225450eb91",
+    "https://bcr.bazel.build/modules/bazel_features/1.43.0/source.json": "1c4207dc858d6de0eecef30026793616bbf420c74aac27b6bad212534a730437",
     "https://bcr.bazel.build/modules/bazel_features/1.9.1/MODULE.bazel": "8f679097876a9b609ad1f60249c49d68bfab783dd9be012faf9d82547b14815a",
     "https://bcr.bazel.build/modules/bazel_skylib/1.0.3/MODULE.bazel": "bcb0fd896384802d1ad283b4e4eb4d718eebd8cb820b0a2c3a347fb971afd9d8",
     "https://bcr.bazel.build/modules/bazel_skylib/1.1.1/MODULE.bazel": "1add3e7d93ff2e6998f9e118022c84d163917d912f5afafb3058e3d2f1545b5e",
@@ -47,6 +48,7 @@
     "https://bcr.bazel.build/modules/bazel_skylib/1.6.1/MODULE.bazel": "8fdee2dbaace6c252131c00e1de4b165dc65af02ea278476187765e1a617b917",
     "https://bcr.bazel.build/modules/bazel_skylib/1.7.0/MODULE.bazel": "0db596f4563de7938de764cc8deeabec291f55e8ec15299718b93c4423e9796d",
     "https://bcr.bazel.build/modules/bazel_skylib/1.7.1/MODULE.bazel": "3120d80c5861aa616222ec015332e5f8d3171e062e3e804a2a0253e1be26e59b",
+    "https://bcr.bazel.build/modules/bazel_skylib/1.8.0/MODULE.bazel": "2fb3fb53675f6adfc1ca5bfbd5cfb655ae350fba4706d924a8ec7e3ba945671c",
     "https://bcr.bazel.build/modules/bazel_skylib/1.8.2/MODULE.bazel": "69ad6927098316848b34a9142bcc975e018ba27f08c4ff403f50c1b6e646ca67",
     "https://bcr.bazel.build/modules/bazel_skylib/1.8.2/source.json": "34a3c8bcf233b835eb74be9d628899bb32999d3e0eadef1947a0a562a2b16ffb",
     "https://bcr.bazel.build/modules/bazel_worker_api/0.0.1/MODULE.bazel": "02a13b77321773b2042e70ee5e4c5e099c8ddee4cf2da9cd420442c36938d4bd",
@@ -56,12 +58,17 @@
     "https://bcr.bazel.build/modules/bazel_worker_java/0.0.4/source.json": "a2d30458fd86cf022c2b6331e652526fa08e17573b2f5034a9dbcacdf9c2583c",
     "https://bcr.bazel.build/modules/buildozer/7.1.2/MODULE.bazel": "2e8dd40ede9c454042645fd8d8d0cd1527966aa5c919de86661e62953cd73d84",
     "https://bcr.bazel.build/modules/buildozer/7.1.2/source.json": "c9028a501d2db85793a6996205c8de120944f50a0d570438fcae0457a5f9d1f8",
+    "https://bcr.bazel.build/modules/eigen/3.4.0.bcr.3/MODULE.bazel": "f6561baff0fc0035c9c1a9e2b0820de106cdb01b37bf5c81276860ccc863e5b2",
+    "https://bcr.bazel.build/modules/eigen/3.4.0.bcr.3/source.json": "a8611a2b5577929ad7e1f44ded19dab21a188125a74ac6192d21d283609f280f",
     "https://bcr.bazel.build/modules/gazelle/0.32.0/MODULE.bazel": "b499f58a5d0d3537f3cf5b76d8ada18242f64ec474d8391247438bf04f58c7b8",
     "https://bcr.bazel.build/modules/gazelle/0.33.0/MODULE.bazel": "a13a0f279b462b784fb8dd52a4074526c4a2afe70e114c7d09066097a46b3350",
     "https://bcr.bazel.build/modules/gazelle/0.34.0/MODULE.bazel": "abdd8ce4d70978933209db92e436deb3a8b737859e9354fb5fd11fb5c2004c8a",
     "https://bcr.bazel.build/modules/gazelle/0.36.0/MODULE.bazel": "e375d5d6e9a6ca59b0cb38b0540bc9a05b6aa926d322f2de268ad267a2ee74c0",
     "https://bcr.bazel.build/modules/gazelle/0.40.0/MODULE.bazel": "42ba5378ebe845fca43989a53186ab436d956db498acde790685fe0e8f9c6146",
     "https://bcr.bazel.build/modules/gazelle/0.40.0/source.json": "1e5ef6e4d8b9b6836d93273c781e78ff829ea2e077afef7a57298040fa4f010a",
+    "https://bcr.bazel.build/modules/gmp/6.3.0.bcr.1/MODULE.bazel": "f9a5442767c9082f25d05c01e20040ea06302d654f2ca9da50674d15b3d1a2dd",
+    "https://bcr.bazel.build/modules/gmp/6.3.0.bcr.1/source.json": "a98a4d4944ca1d45d4c860bfe41d217fb0dc9734af357ed78d8b522c5bba4b37",
+    "https://bcr.bazel.build/modules/gmp/6.3.0/MODULE.bazel": "81e36099789b2a1160372f73155be37ae382c1e593b4a2ce51348bb722735a59",
     "https://bcr.bazel.build/modules/google_benchmark/1.8.2/MODULE.bazel": "a70cf1bba851000ba93b58ae2f6d76490a9feb74192e57ab8e8ff13c34ec50cb",
     "https://bcr.bazel.build/modules/googletest/1.11.0/MODULE.bazel": "3a83f095183f66345ca86aa13c58b59f9f94a2f81999c093d4eeaa2d262d12f4",
     "https://bcr.bazel.build/modules/googletest/1.14.0.bcr.1/MODULE.bazel": "22c31a561553727960057361aa33bf20fb2e98584bc4fec007906e27053f80c6",
@@ -72,8 +79,19 @@
     "https://bcr.bazel.build/modules/jsoncpp/1.9.6/MODULE.bazel": "2f8d20d3b7d54143213c4dfc3d98225c42de7d666011528dc8fe91591e2e17b0",
     "https://bcr.bazel.build/modules/jsoncpp/1.9.6/source.json": "a04756d367a2126c3541682864ecec52f92cdee80a35735a3cb249ce015ca000",
     "https://bcr.bazel.build/modules/libpfm/4.11.0/MODULE.bazel": "45061ff025b301940f1e30d2c16bea596c25b176c8b6b3087e92615adbd52902",
+    "https://bcr.bazel.build/modules/libpfm/4.13.0/MODULE.bazel": "6f2fcac49a2ebd660573aa8075654d84a4904d3a8a7d416f3bde3678573a7244",
+    "https://bcr.bazel.build/modules/libpfm/4.13.0/source.json": "d77a2fd45f92dcebdd864a3c2a05f28506a4f2f71ce15f85333d9ce5b9e29742",
+    "https://bcr.bazel.build/modules/m4/1.4.21.bcr.1/MODULE.bazel": "d89395ff2ea032b3aaf0a6c08bbddbccdbbfd6644dbafd946f65c487cdf060b3",
+    "https://bcr.bazel.build/modules/m4/1.4.21.bcr.1/source.json": "6693ed9c3380e29bbe5200c0e2fa4635b38b2b7cf8c1cb527fc3109456d3ca69",
+    "https://bcr.bazel.build/modules/mpc/1.4.1.bcr.2/MODULE.bazel": "46a2d6db71e0791520548cf9f91ec526749659cd87ef0ab6a4eafe0b82ac7a06",
+    "https://bcr.bazel.build/modules/mpc/1.4.1.bcr.2/source.json": "e4ba9ccb2cfa0490ab2feba5982dc45f28c9239bc3062880e7db8d869ab3684d",
+    "https://bcr.bazel.build/modules/mpfr/4.2.2/MODULE.bazel": "a27d7763535094f9fb14c9d8e7e559e2b5a66b8beaa1b361e46da79a0783616f",
+    "https://bcr.bazel.build/modules/mpfr/4.2.2/source.json": "23c8cc076a26015225ec2da01b963df77181e1bff134a9b30f93d259f443bff6",
+    "https://bcr.bazel.build/modules/nanobind/2.12.0.bcr.1/MODULE.bazel": "561b9c2ecc86b94dc4f07732dfe89236508884333f690f5ee5bb2e065fe7d9e1",
+    "https://bcr.bazel.build/modules/nanobind/2.12.0.bcr.1/source.json": "0ff18b9d0c90072d7301c2056928bb9ae7e640a4fd9320130e321bfc42bf0ccc",
+    "https://bcr.bazel.build/modules/nlohmann_json/3.12.0.bcr.1/MODULE.bazel": "a1c8bb07b5b91d971727c635f449d05623ac9608f6fe4f5f04254ea12f08e349",
+    "https://bcr.bazel.build/modules/nlohmann_json/3.12.0.bcr.1/source.json": "93f82a5ae985eb935c539bfee95e04767187818189241ac956f3ccadbdb8fb02",
     "https://bcr.bazel.build/modules/nlohmann_json/3.6.1/MODULE.bazel": "6f7b417dcc794d9add9e556673ad25cb3ba835224290f4f848f8e2db1e1fca74",
-    "https://bcr.bazel.build/modules/nlohmann_json/3.6.1/source.json": "f448c6e8963fdfa7eb831457df83ad63d3d6355018f6574fb017e8169deb43a9",
     "https://bcr.bazel.build/modules/platforms/0.0.10/MODULE.bazel": "8cb8efaf200bdeb2150d93e162c40f388529a25852b332cec879373771e48ed5",
     "https://bcr.bazel.build/modules/platforms/0.0.11/MODULE.bazel": "0daefc49732e227caa8bfa834d65dc52e8cc18a2faf80df25e8caea151a9413f",
     "https://bcr.bazel.build/modules/platforms/0.0.4/MODULE.bazel": "9b328e31ee156f53f3c416a64f8491f7eb731742655a47c9eec4703a71644aee",
@@ -105,6 +123,8 @@
     "https://bcr.bazel.build/modules/re2/2024-07-02.bcr.1/MODULE.bazel": "b4963dda9b31080be1905ef085ecd7dd6cd47c05c79b9cdf83ade83ab2ab271a",
     "https://bcr.bazel.build/modules/re2/2024-07-02.bcr.1/source.json": "2ff292be6ef3340325ce8a045ecc326e92cbfab47c7cbab4bd85d28971b97ac4",
     "https://bcr.bazel.build/modules/re2/2024-07-02/MODULE.bazel": "0eadc4395959969297cbcf31a249ff457f2f1d456228c67719480205aa306daa",
+    "https://bcr.bazel.build/modules/robin-map/1.4.0/MODULE.bazel": "de8f012a488d8962bb86b3f17b1c0662ac73616f46ded211a177d5b0520732a8",
+    "https://bcr.bazel.build/modules/robin-map/1.4.0/source.json": "298dfead8b8fb9dd2b1e0949cb15568ff8022f4a275b189338d9ec031019cdde",
     "https://bcr.bazel.build/modules/rules_android/0.1.1/MODULE.bazel": "48809ab0091b07ad0182defb787c4c5328bd3a278938415c00a7b69b50c4d3a8",
     "https://bcr.bazel.build/modules/rules_android/0.6.6/MODULE.bazel": "b0fb569752aab65ab1a9db0a8f6cfaf5aa1754965e17e95dcf0e4d88e192a68d",
     "https://bcr.bazel.build/modules/rules_android/0.6.6/source.json": "a9d8dc2d5a102dc03269a94acc886a4cab82cdcb9ccbc77b0f665d6d17a6ae09",
@@ -124,10 +144,15 @@
     "https://bcr.bazel.build/modules/rules_cc/0.1.1/MODULE.bazel": "2f0222a6f229f0bf44cd711dc13c858dad98c62d52bd51d8fc3a764a83125513",
     "https://bcr.bazel.build/modules/rules_cc/0.1.5/MODULE.bazel": "88dfc9361e8b5ae1008ac38f7cdfd45ad738e4fa676a3ad67d19204f045a1fd8",
     "https://bcr.bazel.build/modules/rules_cc/0.2.11/MODULE.bazel": "e94f24f065bf2191dba2dace951814378b66a94bb3bcc48077492fe0508059b5",
-    "https://bcr.bazel.build/modules/rules_cc/0.2.11/source.json": "4d555dc20c9c135b21b2e403cf0ce8393fb65711b2305979ce053df4ee3e78de",
+    "https://bcr.bazel.build/modules/rules_cc/0.2.17/MODULE.bazel": "1849602c86cb60da8613d2de887f9566a6d354a6df6d7009f9d04a14402f9a84",
+    "https://bcr.bazel.build/modules/rules_cc/0.2.18/MODULE.bazel": "4460ec36adc8f722a6a2a4ac9374cb91f2acebadaa93fc37966129afb3dece87",
+    "https://bcr.bazel.build/modules/rules_cc/0.2.18/source.json": "abad668ff2fd63ada1ac49bf386d37e27048b89a3465a6fd968bb832b00a09d3",
+    "https://bcr.bazel.build/modules/rules_cc/0.2.4/MODULE.bazel": "1ff1223dfd24f3ecf8f028446d4a27608aa43c3f41e346d22838a4223980b8cc",
     "https://bcr.bazel.build/modules/rules_cc/0.2.8/MODULE.bazel": "f1df20f0bf22c28192a794f29b501ee2018fa37a3862a1a2132ae2940a23a642",
-    "https://bcr.bazel.build/modules/rules_foreign_cc/0.15.1/MODULE.bazel": "c2c60d26c79fda484acb95cdbec46e89d6b28b4845cb277160ce1e0c8622bb88",
-    "https://bcr.bazel.build/modules/rules_foreign_cc/0.15.1/source.json": "a161811a63ba8a859086da3b7ff3ad04f2e9c255d7727b41087103fc0eb22f55",
+    "https://bcr.bazel.build/modules/rules_cc_autoconf/0.10.1/MODULE.bazel": "9d437cf6abd311a8cbb464bdb987411ed441714074444ae3963ee94baffb3522",
+    "https://bcr.bazel.build/modules/rules_cc_autoconf/0.10.2/MODULE.bazel": "f6b6720ac40a89c885824f58b3e4abee948a6a52412ecc344192831f68c1596c",
+    "https://bcr.bazel.build/modules/rules_cc_autoconf/0.10.3/MODULE.bazel": "936257270b147ea6c17633a7f682a87a915782c45059263811ed895375f2dba9",
+    "https://bcr.bazel.build/modules/rules_cc_autoconf/0.10.3/source.json": "a025eecbbaceb6b8d1d578b382b6f2ebd4b108cd1e02c375d22397b422747b5f",
     "https://bcr.bazel.build/modules/rules_foreign_cc/0.9.0/MODULE.bazel": "c9e8c682bf75b0e7c704166d79b599f93b72cfca5ad7477df596947891feeef6",
     "https://bcr.bazel.build/modules/rules_fuzzing/0.5.2/MODULE.bazel": "40c97d1144356f52905566c55811f13b299453a14ac7769dfba2ac38192337a8",
     "https://bcr.bazel.build/modules/rules_go/0.41.0/MODULE.bazel": "55861d8e8bb0e62cbd2896f60ff303f62ffcb0eddb74ecb0e5c0cbe36fc292c8",
@@ -190,12 +215,12 @@
     "https://bcr.bazel.build/modules/rules_python/0.28.0/MODULE.bazel": "cba2573d870babc976664a912539b320cbaa7114cd3e8f053c720171cde331ed",
     "https://bcr.bazel.build/modules/rules_python/0.31.0/MODULE.bazel": "93a43dc47ee570e6ec9f5779b2e64c1476a6ce921c48cc9a1678a91dd5f8fd58",
     "https://bcr.bazel.build/modules/rules_python/0.33.2/MODULE.bazel": "3e036c4ad8d804a4dad897d333d8dce200d943df4827cb849840055be8d2e937",
+    "https://bcr.bazel.build/modules/rules_python/0.36.0/MODULE.bazel": "a4ce1ccea92b9106c7d16ab9ee51c6183107e78ba4a37aa65055227b80cd480c",
     "https://bcr.bazel.build/modules/rules_python/0.37.1/MODULE.bazel": "3faeb2d9fa0a81f8980643ee33f212308f4d93eea4b9ce6f36d0b742e71e9500",
     "https://bcr.bazel.build/modules/rules_python/0.37.2/MODULE.bazel": "b5ffde91410745750b6c13be1c5dc4555ef5bc50562af4a89fd77807fdde626a",
     "https://bcr.bazel.build/modules/rules_python/0.4.0/MODULE.bazel": "9208ee05fd48bf09ac60ed269791cf17fb343db56c8226a720fbb1cdf467166c",
     "https://bcr.bazel.build/modules/rules_python/0.40.0/MODULE.bazel": "9d1a3cd88ed7d8e39583d9ffe56ae8a244f67783ae89b60caafc9f5cf318ada7",
     "https://bcr.bazel.build/modules/rules_python/1.0.0/MODULE.bazel": "898a3d999c22caa585eb062b600f88654bf92efb204fa346fb55f6f8edffca43",
-    "https://bcr.bazel.build/modules/rules_python/1.2.0/MODULE.bazel": "5aeeb48b2a6c19d668b48adf2b8a2b209a6310c230db0ce77450f148a89846e4",
     "https://bcr.bazel.build/modules/rules_python/1.9.0/MODULE.bazel": "afc3a05f29f09f2d3ee95ad99a145250dab41a2b2d8d6f82cc91936b3213282c",
     "https://bcr.bazel.build/modules/rules_python/1.9.0/source.json": "3921ea0b65298d51aead5b9e4a82203d7be9b5918619b58b53f1c259f4e63169",
     "https://bcr.bazel.build/modules/rules_robolectric/4.14.1.2/MODULE.bazel": "d44fec647d0aeb67b9f3b980cf68ba634976f3ae7ccd6c07d790b59b87a4f251",
@@ -220,6 +245,8 @@
     "https://bcr.bazel.build/modules/swift_argument_parser/1.3.1.1/source.json": "32bd87e5f4d7acc57c5b2ff7c325ae3061d5e242c0c4c214ae87e0f1c13e54cb",
     "https://bcr.bazel.build/modules/upb/0.0.0-20220923-a547704/MODULE.bazel": "7298990c00040a0e2f121f6c32544bab27d4452f80d9ce51349b1a28f3005c43",
     "https://bcr.bazel.build/modules/upb/0.0.0-20230516-61a97ef/MODULE.bazel": "c0df5e35ad55e264160417fd0875932ee3c9dda63d9fccace35ac62f45e1b6f9",
+    "https://bcr.bazel.build/modules/vulkan_headers/1.4.349/MODULE.bazel": "2f45236b9d6b9dd19160901243582fff2d32ddae5a4b93844cb6cfab9613ca97",
+    "https://bcr.bazel.build/modules/vulkan_headers/1.4.349/source.json": "7c210ec89fefb118909330d6abcd9d0ec8db6f415c7c8a3ea9e9637f81faccbb",
     "https://bcr.bazel.build/modules/zlib-ng/2.0.7/MODULE.bazel": "3ca640b745b55f287e95aa0477e6cd76dfa0a565725d5412b7d8dae4274436c8",
     "https://bcr.bazel.build/modules/zlib-ng/2.0.7/source.json": "107bf3a70ecf9f87fe90f7002c9e35423564ffed070affec23d41478503bc5cf",
     "https://bcr.bazel.build/modules/zlib/1.2.11/MODULE.bazel": "07b389abc85fdbca459b69e2ec656ae5622873af3f845e1c9d80fe179f3effa0",
@@ -234,7 +261,7 @@
   "moduleExtensions": {
     "//:extensions.bzl%llvm_repos_extension": {
       "general": {
-        "bzlTransitiveDigest": "YRuiz8qImVT8uVV8Sn8qLFmHoDJtHSxaYC6osnuKKh4=",
+        "bzlTransitiveDigest": "2G0pj5R0A++t8tQS/54PzDFMfHp9yyhPEWq7SWJ5I7U=",
         "usagesDigest": "X0yUkkWyxQ2Y5oZVDkRSE/K4YkDWo1IjhHsL+1weKyU=",
         "recordedFileInputs": {},
         "recordedDirentsInputs": {},
@@ -247,92 +274,17 @@
               "path": "../../"
             }
           },
-          "vulkan_headers": {
-            "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive",
-            "attributes": {
-              "build_file": "@@+llvm_repos_extension+llvm-raw//utils/bazel/third_party_build:vulkan_headers.BUILD",
-              "sha256": "19f491784ef0bc73caff877d11c96a48b946b5a1c805079d9006e3fbaa5c1895",
-              "strip_prefix": "Vulkan-Headers-9bd3f561bcee3f01d22912de10bb07ce4e23d378",
-              "urls": [
-                "https://github.com/KhronosGroup/Vulkan-Headers/archive/9bd3f561bcee3f01d22912de10bb07ce4e23d378.tar.gz"
-              ]
-            }
-          },
           "vulkan_sdk": {
             "repoRuleId": "@@//:vulkan_sdk.bzl%vulkan_sdk_setup",
             "attributes": {}
           },
-          "gmp": {
-            "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive",
-            "attributes": {
-              "urls": [
-                "https://gmplib.org/download/gmp/gmp-6.2.1.tar.xz",
-                "https://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.xz"
-              ],
-              "build_file": "@@+llvm_repos_extension+llvm-raw//utils/bazel/third_party_build:gmp.BUILD",
-              "sha256": "fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2",
-              "strip_prefix": "gmp-6.2.1"
-            }
-          },
-          "mpfr": {
-            "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive",
-            "attributes": {
-              "urls": [
-                "https://www.mpfr.org/mpfr-current/mpfr-4.2.2.tar.gz"
-              ],
-              "sha256": "826cbb24610bd193f36fde172233fb8c009f3f5c2ad99f644d0dea2e16a20e42",
-              "strip_prefix": "mpfr-4.2.2",
-              "build_file": "@@+llvm_repos_extension+llvm-raw//utils/bazel/third_party_build:mpfr.BUILD"
-            }
-          },
-          "mpc": {
-            "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive",
-            "attributes": {
-              "urls": [
-                "https://ftp.gnu.org/gnu/mpc/mpc-1.3.1.tar.gz"
-              ],
-              "sha256": "ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8",
-              "strip_prefix": "mpc-1.3.1",
-              "build_file": "@@+llvm_repos_extension+llvm-raw//utils/bazel/third_party_build:mpc.BUILD"
-            }
-          },
-          "pfm": {
-            "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive",
-            "attributes": {
-              "urls": [
-                "https://versaweb.dl.sourceforge.net/project/perfmon2/libpfm4/libpfm-4.13.0.tar.gz",
-                "https://sourceforge.net/projects/perfmon2/files/libpfm4/libpfm-4.13.0.tar.gz"
-              ],
-              "sha256": "d18b97764c755528c1051d376e33545d0eb60c6ebf85680436813fa5b04cc3d1",
-              "strip_prefix": "libpfm-4.13.0",
-              "build_file": "@@+llvm_repos_extension+llvm-raw//utils/bazel/third_party_build:pfm.BUILD"
-            }
-          },
           "pyyaml": {
             "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive",
             "attributes": {
               "url": "https://github.com/yaml/pyyaml/archive/refs/tags/5.1.zip",
               "sha256": "f0a35d7f282a6d6b1a4f3f3965ef5c124e30ed27a0088efb97c0977268fd671f",
               "strip_prefix": "pyyaml-5.1/lib3",
-              "build_file": "@@+llvm_repos_extension+llvm-raw//utils/bazel/third_party_build:pyyaml.BUILD"
-            }
-          },
-          "robin_map": {
-            "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive",
-            "attributes": {
-              "build_file": "@@+llvm_repos_extension+llvm-raw//utils/bazel/third_party_build:robin_map.BUILD",
-              "sha256": "a8424ad3b0affd4c57ed26f0f3d8a29604f0e1f2ef2089f497f614b1c94c7236",
-              "strip_prefix": "robin-map-1.3.0",
-              "url": "https://github.com/Tessil/robin-map/archive/refs/tags/v1.3.0.tar.gz"
-            }
-          },
-          "nanobind": {
-            "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive",
-            "attributes": {
-              "build_file": "@@+llvm_repos_extension+llvm-raw//utils/bazel/third_party_build:nanobind.BUILD",
-              "sha256": "8ce3667dce3e64fc06bfb9b778b6f48731482362fb89a43da156632266cd5a90",
-              "strip_prefix": "nanobind-2.9.2",
-              "url": "https://github.com/wjakob/nanobind/archive/refs/tags/v2.9.2.tar.gz"
+              "build_file_content": "load(\"@rules_python//python:defs.bzl\", \"py_library\")\n\npackage(\n    default_visibility = [\"//visibility:public\"],\n    # BSD/MIT-like license (for PyYAML)\n    licenses = [\"notice\"],\n)\n\npy_library(\n    name = \"yaml\",\n    srcs = glob([\"yaml/*.py\"]),\n)\n"
             }
           }
         },
diff --git a/utils/bazel/extensions.bzl b/utils/bazel/extensions.bzl
index e7517127f4870..b1c81762d3394 100644
--- a/utils/bazel/extensions.bzl
+++ b/utils/bazel/extensions.bzl
@@ -8,6 +8,21 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
 load("@bazel_tools//tools/build_defs/repo:local.bzl", "new_local_repository")
 load(":vulkan_sdk.bzl", "vulkan_sdk_setup")
 
+_PYYAML_CONTENT = """\
+load("@rules_python//python:defs.bzl", "py_library")
+
+package(
+    default_visibility = ["//visibility:public"],
+    # BSD/MIT-like license (for PyYAML)
+    licenses = ["notice"],
+)
+
+py_library(
+    name = "yaml",
+    srcs = glob(["yaml/*.py"]),
+)
+"""
+
 def _llvm_repos_extension_impl(module_ctx):
     if any([m.is_root and m.name == "llvm-project-overlay" for m in module_ctx.modules]):
         new_local_repository(
@@ -16,83 +31,14 @@ def _llvm_repos_extension_impl(module_ctx):
             path = "../../",
         )
 
-    http_archive(
-        name = "vulkan_headers",
-        build_file = "@llvm-raw//utils/bazel/third_party_build:vulkan_headers.BUILD",
-        sha256 = "19f491784ef0bc73caff877d11c96a48b946b5a1c805079d9006e3fbaa5c1895",
-        strip_prefix = "Vulkan-Headers-9bd3f561bcee3f01d22912de10bb07ce4e23d378",
-        urls = [
-            "https://github.com/KhronosGroup/Vulkan-Headers/archive/9bd3f561bcee3f01d22912de10bb07ce4e23d378.tar.gz",
-        ],
-    )
-
     vulkan_sdk_setup(name = "vulkan_sdk")
 
-    http_archive(
-        name = "gmp",
-        urls = [
-            "https://gmplib.org/download/gmp/gmp-6.2.1.tar.xz",
-            "https://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.xz",
-        ],
-        build_file = "@llvm-raw//utils/bazel/third_party_build:gmp.BUILD",
-        sha256 = "fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2",
-        strip_prefix = "gmp-6.2.1",
-    )
-
-    http_archive(
-        name = "mpfr",
-        urls = [
-            "https://www.mpfr.org/mpfr-current/mpfr-4.2.2.tar.gz",
-        ],
-        sha256 = "826cbb24610bd193f36fde172233fb8c009f3f5c2ad99f644d0dea2e16a20e42",
-        strip_prefix = "mpfr-4.2.2",
-        build_file = "@llvm-raw//utils/bazel/third_party_build:mpfr.BUILD",
-    )
-
-    http_archive(
-        name = "mpc",
-        urls = [
-            "https://ftp.gnu.org/gnu/mpc/mpc-1.3.1.tar.gz",
-        ],
-        sha256 = "ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8",
-        strip_prefix = "mpc-1.3.1",
-        build_file = "@llvm-raw//utils/bazel/third_party_build:mpc.BUILD",
-    )
-
-    http_archive(
-        name = "pfm",
-        urls = [
-            "https://versaweb.dl.sourceforge.net/project/perfmon2/libpfm4/libpfm-4.13.0.tar.gz",
-            "https://sourceforge.net/projects/perfmon2/files/libpfm4/libpfm-4.13.0.tar.gz",
-        ],
-        sha256 = "d18b97764c755528c1051d376e33545d0eb60c6ebf85680436813fa5b04cc3d1",
-        strip_prefix = "libpfm-4.13.0",
-        build_file = "@llvm-raw//utils/bazel/third_party_build:pfm.BUILD",
-    )
-
     http_archive(
         name = "pyyaml",
         url = "https://github.com/yaml/pyyaml/archive/refs/tags/5.1.zip",
         sha256 = "f0a35d7f282a6d6b1a4f3f3965ef5c124e30ed27a0088efb97c0977268fd671f",
         strip_prefix = "pyyaml-5.1/lib3",
-        build_file = "@llvm-raw//utils/bazel/third_party_build:pyyaml.BUILD",
-    )
-
-    # TODO: bump to robin-map-1.4.0
-    http_archive(
-        name = "robin_map",
-        build_file = "@llvm-raw//utils/bazel/third_party_build:robin_map.BUILD",
-        sha256 = "a8424ad3b0affd4c57ed26f0f3d8a29604f0e1f2ef2089f497f614b1c94c7236",
-        strip_prefix = "robin-map-1.3.0",
-        url = "https://github.com/Tessil/robin-map/archive/refs/tags/v1.3.0.tar.gz",
-    )
-
-    http_archive(
-        name = "nanobind",
-        build_file = "@llvm-raw//utils/bazel/third_party_build:nanobind.BUILD",
-        sha256 = "8ce3667dce3e64fc06bfb9b778b6f48731482362fb89a43da156632266cd5a90",
-        strip_prefix = "nanobind-2.9.2",
-        url = "https://github.com/wjakob/nanobind/archive/refs/tags/v2.9.2.tar.gz",
+        build_file_content = _PYYAML_CONTENT,
     )
 
 llvm_repos_extension = module_extension(
diff --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
index 87963e4524b39..d11154653bb10 100644
--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -57,6 +57,13 @@ config_setting(
     flag_values = {":mpfr": "system"},
 )
 
+cc_library(
+    name = "libmpfr_system",
+    linkopts = ["-lmpfr"],
+    tags = ["manual"],
+    visibility = ["//libc:__subpackages__"],
+)
+
 # A flag to pick which `mpc` to use for math tests.
 # Usage: `-- at llvm-project//libc:mpc=<disable|external|system>`.
 # Flag documentation: https://bazel.build/extending/config
@@ -85,6 +92,13 @@ config_setting(
     flag_values = {":mpc": "system"},
 )
 
+cc_library(
+    name = "libmpc_system",
+    linkopts = ["-lmpc"],
+    tags = ["manual"],
+    visibility = ["//libc:__subpackages__"],
+)
+
 # A flag to enable modular format for printf.
 # Usage: `-- at llvm-project//libc:modular_format=<disable|enable>`.
 string_flag(
@@ -2316,15 +2330,15 @@ libc_support_library(
     name = "__support_osutil_syscall",
     hdrs = ["src/__support/OSUtil/syscall.h"],
     textual_hdrs = select({
-        "@platforms//os:macos": [
-            "src/__support/OSUtil/darwin/syscall.h",
-            "src/__support/OSUtil/darwin/arm/syscall.h",
-        ],
         "@platforms//os:linux": [
             "src/__support/OSUtil/linux/syscall.h",
             "src/__support/OSUtil/linux/aarch64/syscall.h",
             "src/__support/OSUtil/linux/x86_64/syscall.h",
         ],
+        "@platforms//os:macos": [
+            "src/__support/OSUtil/darwin/syscall.h",
+            "src/__support/OSUtil/darwin/arm/syscall.h",
+        ],
         "@platforms//os:windows": [],
     }),
     deps = [
@@ -2639,8 +2653,8 @@ libc_support_library(
     name = "__support_osutil_io",
     hdrs = ["src/__support/OSUtil/io.h"],
     textual_hdrs = select({
-        "@platforms//os:macos": ["src/__support/OSUtil/darwin/io.h"],
         "@platforms//os:linux": ["src/__support/OSUtil/linux/io.h"],
+        "@platforms//os:macos": ["src/__support/OSUtil/darwin/io.h"],
         "@platforms//os:windows": ["src/__support/OSUtil/windows/io.h"],
     }),
     deps = [
diff --git a/utils/bazel/llvm-project-overlay/libc/utils/MPCWrapper/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/utils/MPCWrapper/BUILD.bazel
index 79a2096aee43b..dc08a96e7474f 100644
--- a/utils/bazel/llvm-project-overlay/libc/utils/MPCWrapper/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/utils/MPCWrapper/BUILD.bazel
@@ -21,8 +21,8 @@ cc_library(
     deps = select(
         {
             "//conditions:default": [],
-            "//libc:mpc_external": ["@mpc//:mpc_external"],
-            "//libc:mpc_system": ["@mpc//:mpc_system"],
+            "//libc:mpc_external": ["@mpc"],
+            "//libc:mpc_system": ["//libc:libmpc_system"],
         },
     ),
 )
diff --git a/utils/bazel/llvm-project-overlay/libc/utils/MPFRWrapper/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/utils/MPFRWrapper/BUILD.bazel
index dc934a4422105..2593fae4d432b 100644
--- a/utils/bazel/llvm-project-overlay/libc/utils/MPFRWrapper/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/utils/MPFRWrapper/BUILD.bazel
@@ -21,8 +21,8 @@ cc_library(
     deps = select(
         {
             "//conditions:default": [],
-            "//libc:mpfr_external": ["@mpfr//:mpfr_external"],
-            "//libc:mpfr_system": ["@mpfr//:mpfr_system"],
+            "//libc:mpfr_external": ["@mpfr"],
+            "//libc:mpfr_system": ["//libc:libmpfr_system"],
         },
     ),
 )
diff --git a/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel b/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
index 1bab2d62595bc..03d32d6ec294c 100644
--- a/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel
@@ -4674,6 +4674,16 @@ config_setting(
     flag_values = {":pfm": "system"},
 )
 
+cc_library(
+    name = "libpfm_system",
+    linkopts = ["-lpfm"],
+    tags = ["manual"],
+    target_compatible_with = select({
+        "@platforms//os:linux": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+)
+
 cc_library(
     name = "maybe_pfm",
     # We want dependencies of this library to have -DHAVE_LIBPFM conditionally
@@ -4684,8 +4694,8 @@ cc_library(
         "//conditions:default": [],
     }),
     deps = select({
-        ":pfm_external": ["@pfm//:pfm_external"],
-        ":pfm_system": ["@pfm//:pfm_system"],
+        ":pfm_external": ["@pfm"],
+        ":pfm_system": [":libpfm_system"],
         "//conditions:default": [],
     }),
 )
diff --git a/utils/bazel/third_party_build/BUILD.bazel b/utils/bazel/third_party_build/BUILD.bazel
deleted file mode 100644
index 98077a0651d9d..0000000000000
--- a/utils/bazel/third_party_build/BUILD.bazel
+++ /dev/null
@@ -1,5 +0,0 @@
-# This file is licensed under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-licenses(["notice"])
diff --git a/utils/bazel/third_party_build/gmp.BUILD b/utils/bazel/third_party_build/gmp.BUILD
deleted file mode 100644
index fb0c3bf75b7ed..0000000000000
--- a/utils/bazel/third_party_build/gmp.BUILD
+++ /dev/null
@@ -1,20 +0,0 @@
-# This file is licensed under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-load("@rules_foreign_cc//foreign_cc:defs.bzl", "configure_make_variant")
-
-filegroup(
-    name = "sources",
-    srcs = glob(["**"]),
-)
-
-configure_make_variant(
-    name = "gmp",
-    configure_options = ["--with-pic"],
-    copts = ["-w"],
-    lib_name = "libgmp",
-    lib_source = ":sources",
-    toolchain = "@rules_foreign_cc//toolchains:preinstalled_autoconf_toolchain",
-    visibility = ["//visibility:public"],
-)
diff --git a/utils/bazel/third_party_build/mpc.BUILD b/utils/bazel/third_party_build/mpc.BUILD
deleted file mode 100644
index 6af2773fa6031..0000000000000
--- a/utils/bazel/third_party_build/mpc.BUILD
+++ /dev/null
@@ -1,34 +0,0 @@
-# This file is licensed under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-load("@rules_cc//cc:defs.bzl", "cc_library")
-load("@rules_foreign_cc//foreign_cc:defs.bzl", "configure_make_variant")
-
-filegroup(
-    name = "sources",
-    srcs = glob(["**"]),
-)
-
-configure_make_variant(
-    name = "mpc",
-    configure_options = ["--with-pic"],
-    copts = ["-w"],
-    lib_name = "libmpc",
-    lib_source = ":sources",
-    toolchain = "@rules_foreign_cc//toolchains:preinstalled_autoconf_toolchain",
-    visibility = ["//visibility:public"],
-    deps = ["@mpfr//:mpfr_"],
-)
-
-alias(
-    name = "mpc_external",
-    actual = "@mpc//:mpc_",
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "mpc_system",
-    linkopts = ["-lmpc"],
-    visibility = ["//visibility:public"],
-)
diff --git a/utils/bazel/third_party_build/mpfr.BUILD b/utils/bazel/third_party_build/mpfr.BUILD
deleted file mode 100644
index 8476c8c25403c..0000000000000
--- a/utils/bazel/third_party_build/mpfr.BUILD
+++ /dev/null
@@ -1,34 +0,0 @@
-# This file is licensed under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-load("@rules_cc//cc:defs.bzl", "cc_library")
-load("@rules_foreign_cc//foreign_cc:defs.bzl", "configure_make_variant")
-
-filegroup(
-    name = "sources",
-    srcs = glob(["**"]),
-)
-
-configure_make_variant(
-    name = "mpfr",
-    configure_options = ["--with-pic"],
-    copts = ["-w"],
-    lib_name = "libmpfr",
-    lib_source = ":sources",
-    toolchain = "@rules_foreign_cc//toolchains:preinstalled_autoconf_toolchain",
-    visibility = ["//visibility:public"],
-    deps = ["@gmp//:gmp_"],
-)
-
-alias(
-    name = "mpfr_external",
-    actual = "@mpfr//:mpfr_",
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "mpfr_system",
-    linkopts = ["-lmpfr"],
-    visibility = ["//visibility:public"],
-)
diff --git a/utils/bazel/third_party_build/nanobind.BUILD b/utils/bazel/third_party_build/nanobind.BUILD
deleted file mode 100644
index e8de0bd07a325..0000000000000
--- a/utils/bazel/third_party_build/nanobind.BUILD
+++ /dev/null
@@ -1,37 +0,0 @@
-load("@rules_cc//cc:defs.bzl", "cc_library")
-
-cc_library(
-    name = "nanobind",
-    srcs = glob(
-        [
-            "src/*.cpp",
-        ],
-        exclude = ["src/nb_combined.cpp"],
-    ),
-    additional_linker_inputs = select({
-        "@platforms//os:macos": [":cmake/darwin-ld-cpython.sym"],
-        "//conditions:default": [],
-    }),
-    defines = [
-        "NB_BUILD=1",
-        "NB_SHARED=1",
-    ],
-    includes = ["include"],
-    linkopts = select({
-        "@platforms//os:macos": [
-            "-Wl,@$(location :cmake/darwin-ld-cpython.sym)",
-        ],
-        "//conditions:default": [],
-    }),
-    textual_hdrs = glob(
-        [
-            "include/**/*.h",
-            "src/*.h",
-        ],
-    ),
-    visibility = ["//visibility:public"],
-    deps = [
-        "@robin_map",
-        "@rules_python//python/cc:current_py_cc_headers",
-    ],
-)
diff --git a/utils/bazel/third_party_build/pfm.BUILD b/utils/bazel/third_party_build/pfm.BUILD
deleted file mode 100644
index 00dd49a56dbb3..0000000000000
--- a/utils/bazel/third_party_build/pfm.BUILD
+++ /dev/null
@@ -1,43 +0,0 @@
-# This file is licensed under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-load("@rules_cc//cc:defs.bzl", "cc_library")
-load("@rules_foreign_cc//foreign_cc:defs.bzl", "make_variant")
-
-filegroup(
-    name = "sources",
-    srcs = glob(["**"]),
-)
-
-make_variant(
-    name = "pfm",
-    copts = ["-w"],
-    env = {
-        "CONFIG_PFMLIB_SHARED": "n",
-    },
-    lib_name = "libpfm",
-    lib_source = ":sources",
-    target_compatible_with = select({
-        "@platforms//os:linux": [],
-        "//conditions:default": ["@platforms//:incompatible"],
-    }),
-    toolchain = "@rules_foreign_cc//toolchains:preinstalled_autoconf_toolchain",
-    visibility = ["//visibility:private"],
-)
-
-alias(
-    name = "pfm_external",
-    actual = "@pfm//:pfm_",
-    visibility = ["//visibility:public"],
-)
-
-cc_library(
-    name = "pfm_system",
-    linkopts = ["-lpfm"],
-    target_compatible_with = select({
-        "@platforms//os:linux": [],
-        "//conditions:default": ["@platforms//:incompatible"],
-    }),
-    visibility = ["//visibility:public"],
-)
diff --git a/utils/bazel/third_party_build/pyyaml.BUILD b/utils/bazel/third_party_build/pyyaml.BUILD
deleted file mode 100644
index 78261a7f60d9b..0000000000000
--- a/utils/bazel/third_party_build/pyyaml.BUILD
+++ /dev/null
@@ -1,16 +0,0 @@
-# This file is licensed under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-load("@rules_python//python:defs.bzl", "py_library")
-
-package(
-    default_visibility = ["//visibility:public"],
-    # BSD/MIT-like license (for PyYAML)
-    licenses = ["notice"],
-)
-
-py_library(
-    name = "yaml",
-    srcs = glob(["yaml/*.py"]),
-)
diff --git a/utils/bazel/third_party_build/robin_map.BUILD b/utils/bazel/third_party_build/robin_map.BUILD
deleted file mode 100644
index 3dbd746c46d9c..0000000000000
--- a/utils/bazel/third_party_build/robin_map.BUILD
+++ /dev/null
@@ -1,14 +0,0 @@
-load("@rules_cc//cc:defs.bzl", "cc_library")
-
-cc_library(
-    name = "robin_map",
-    hdrs = [
-        "include/tsl/robin_growth_policy.h",
-        "include/tsl/robin_hash.h",
-        "include/tsl/robin_map.h",
-        "include/tsl/robin_set.h",
-    ],
-    includes = ["."],
-    strip_include_prefix = "include",
-    visibility = ["//visibility:public"],
-)
diff --git a/utils/bazel/third_party_build/vulkan_headers.BUILD b/utils/bazel/third_party_build/vulkan_headers.BUILD
deleted file mode 100644
index f40a965fde81b..0000000000000
--- a/utils/bazel/third_party_build/vulkan_headers.BUILD
+++ /dev/null
@@ -1,32 +0,0 @@
-# This file is licensed under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-load("@rules_cc//cc:defs.bzl", "cc_library")
-
-package(
-    default_visibility = ["//visibility:public"],
-    licenses = ["notice"],
-)
-
-# Exports all headers but defining VK_NO_PROTOTYPES to disable the
-# inclusion of C function prototypes. Useful if dynamically loading
-# all symbols via dlopen/etc.
-# Not all headers are hermetic, so they are just included as textual
-# headers to disable additional validation.
-cc_library(
-    name = "vulkan_headers_no_prototypes",
-    defines = ["VK_NO_PROTOTYPES"],
-    includes = ["include"],
-    textual_hdrs = glob(["include/vulkan/*.h"]),
-)
-
-# Exports all headers, including C function prototypes. Useful if statically
-# linking against the Vulkan SDK.
-# Not all headers are hermetic, so they are just included as textual
-# headers to disable additional validation.
-cc_library(
-    name = "vulkan_headers",
-    includes = ["include"],
-    textual_hdrs = glob(["include/vulkan/*.h"]),
-)
diff --git a/utils/bazel/third_party_build/zlib-ng.BUILD b/utils/bazel/third_party_build/zlib-ng.BUILD
deleted file mode 100644
index d23fd94f9bd29..0000000000000
--- a/utils/bazel/third_party_build/zlib-ng.BUILD
+++ /dev/null
@@ -1,105 +0,0 @@
-# This file is licensed under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
-load("@rules_cc//cc:cc_library.bzl", "cc_library")
-
-package(
-    default_visibility = ["//visibility:public"],
-    # BSD/MIT-like license (for zlib)
-    licenses = ["notice"],
-)
-
-copy_file(
-    # The input template is identical to the CMake output.
-    name = "zconf_gen",
-    src = "zconf.h.in",
-    out = "zconf.h",
-    allow_symlink = True,
-)
-
-cc_library(
-    name = "zlib",
-    srcs = select({
-        "@llvm-project//third-party:llvm_zlib_enabled": [
-            "adler32.c",
-            "adler32_p.h",
-            "chunkset.c",
-            "chunkset_tpl.h",
-            "compare258.c",
-            "compress.c",
-            "crc32.c",
-            "crc32_comb.c",
-            "crc32_comb_tbl.h",
-            "crc32_p.h",
-            "crc32_tbl.h",
-            "deflate.c",
-            "deflate.h",
-            "deflate_fast.c",
-            "deflate_medium.c",
-            "deflate_p.h",
-            "deflate_quick.c",
-            "deflate_slow.c",
-            "fallback_builtins.h",
-            "functable.c",
-            "functable.h",
-            "infback.c",
-            "inffast.c",
-            "inffast.h",
-            "inffixed_tbl.h",
-            "inflate.c",
-            "inflate.h",
-            "inflate_p.h",
-            "inftrees.c",
-            "inftrees.h",
-            "insert_string.c",
-            "insert_string_tpl.h",
-            "match_tpl.h",
-            "trees.c",
-            "trees.h",
-            "trees_emit.h",
-            "trees_tbl.h",
-            "uncompr.c",
-            "zbuild.h",
-            "zendian.h",
-            "zutil.c",
-            "zutil.h",
-            "zutil_p.h",
-        ],
-        "//conditions:default": [],
-    }),
-    hdrs = select({
-        "@llvm-project//third-party:llvm_zlib_enabled": [
-            "zlib.h",
-            ":zconf_gen",
-        ],
-        "//conditions:default": [],
-    }),
-    copts = [
-        "-std=c11",
-        "-DZLIB_COMPAT",
-        "-DWITH_GZFILEOP",
-        "-DWITH_OPTIM",
-        "-DWITH_NEW_STRATEGIES",
-        # For local builds you might want to add "-DWITH_NATIVE_INSTRUCTIONS"
-        # here to improve performance. Native instructions aren't enabled in
-        # the default config for reproducibility.
-    ],
-    defines = select({
-        "@llvm-project//third-party:llvm_zlib_enabled": [
-            "LLVM_ENABLE_ZLIB=1",
-        ],
-        "//conditions:default": [
-            "LLVM_ENABLE_ZLIB=0",
-        ],
-    }),
-    # Clang includes zlib with angled instead of quoted includes, so we need
-    # strip_include_prefix here.
-    strip_include_prefix = ".",
-    visibility = ["//visibility:public"],
-)
-
-alias(
-    name = "zlib-ng",
-    actual = ":zlib",
-)
diff --git a/utils/bazel/third_party_build/zstd.BUILD b/utils/bazel/third_party_build/zstd.BUILD
deleted file mode 100644
index 89da165225ad7..0000000000000
--- a/utils/bazel/third_party_build/zstd.BUILD
+++ /dev/null
@@ -1,44 +0,0 @@
-# This file is licensed under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-load("@rules_cc//cc:cc_library.bzl", "cc_library")
-
-package(
-    default_visibility = ["//visibility:public"],
-    # BSD/MIT-like license (for zstd)
-    licenses = ["notice"],
-)
-
-cc_library(
-    name = "zstd",
-    srcs = select({
-        "@llvm-project//third-party:llvm_zstd_enabled": glob([
-            "lib/common/*.c",
-            "lib/common/*.h",
-            "lib/compress/*.c",
-            "lib/compress/*.h",
-            "lib/decompress/*.c",
-            "lib/decompress/*.h",
-            "lib/decompress/*.S",
-            "lib/dictBuilder/*.c",
-            "lib/dictBuilder/*.h",
-        ]),
-        "//conditions:default": [],
-    }),
-    hdrs = select({
-        "@llvm-project//third-party:llvm_zstd_enabled": [
-            "lib/zdict.h",
-            "lib/zstd.h",
-            "lib/zstd_errors.h",
-        ],
-        "//conditions:default": [],
-    }),
-    defines = select({
-        "@llvm-project//third-party:llvm_zstd_enabled": [
-            "LLVM_ENABLE_ZSTD=1",
-            "ZSTD_MULTITHREAD",
-        ],
-        "//conditions:default": [],
-    }),
-    strip_include_prefix = "lib",
-)



More information about the llvm-commits mailing list