Geoffrey Martin-Noble | 4aeb2e6 | 2021-05-18 22:42:25 | [diff] [blame] | 1 | # This file is licensed under the Apache License v2.0 with LLVM Exceptions. |
| 2 | # See https://llvm.org/LICENSE.txt for license information. |
| 3 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 4 | |
Geoffrey Martin-Noble | 4aeb2e6 | 2021-05-18 22:42:25 | [diff] [blame] | 5 | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
| 6 | load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") |
| 7 | |
Jorge Gorbe Moya | 0e417a7 | 2025-01-16 18:12:46 | [diff] [blame] | 8 | SKYLIB_VERSION = "1.7.1" |
Geoffrey Martin-Noble | 8b86b3a | 2021-07-16 18:49:50 | [diff] [blame] | 9 | |
| 10 | http_archive( |
| 11 | name = "bazel_skylib", |
Jorge Gorbe Moya | 0e417a7 | 2025-01-16 18:12:46 | [diff] [blame] | 12 | sha256 = "bc283cdfcd526a52c3201279cda4bc298652efa898b10b4db0837dc51652756f", |
Geoffrey Martin-Noble | 8b86b3a | 2021-07-16 18:49:50 | [diff] [blame] | 13 | urls = [ |
Jordan Rupprecht | 2fcfc97 | 2024-02-12 19:35:17 | [diff] [blame] | 14 | "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version = SKYLIB_VERSION), |
| 15 | "https://github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version = SKYLIB_VERSION), |
Geoffrey Martin-Noble | 8b86b3a | 2021-07-16 18:49:50 | [diff] [blame] | 16 | ], |
| 17 | ) |
| 18 | |
Nick Desaulniers | 5877e5b | 2024-12-10 21:07:52 | [diff] [blame] | 19 | http_archive( |
| 20 | name = "rules_cc", |
Nick Desaulniers | 5877e5b | 2024-12-10 21:07:52 | [diff] [blame] | 21 | sha256 = "abc605dd850f813bb37004b77db20106a19311a96b2da1c92b789da529d28fe1", |
| 22 | strip_prefix = "rules_cc-0.0.17", |
Jorge Gorbe Moya | 0e417a7 | 2025-01-16 18:12:46 | [diff] [blame] | 23 | urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.17/rules_cc-0.0.17.tar.gz"], |
Nick Desaulniers | 5877e5b | 2024-12-10 21:07:52 | [diff] [blame] | 24 | ) |
| 25 | |
Christian Sigg | 81d5412 | 2021-08-18 07:14:42 | [diff] [blame] | 26 | new_local_repository( |
| 27 | name = "llvm-raw", |
Christian Sigg | 81d5412 | 2021-08-18 07:14:42 | [diff] [blame] | 28 | build_file_content = "# empty", |
Jordan Rupprecht | 4aa7769 | 2022-12-28 16:13:20 | [diff] [blame] | 29 | path = "../../", |
Geoffrey Martin-Noble | 4aeb2e6 | 2021-05-18 22:42:25 | [diff] [blame] | 30 | ) |
| 31 | |
Christian Sigg | 81d5412 | 2021-08-18 07:14:42 | [diff] [blame] | 32 | load("@llvm-raw//utils/bazel:configure.bzl", "llvm_configure") |
| 33 | |
| 34 | llvm_configure(name = "llvm-project") |
| 35 | |
Geoffrey Martin-Noble | 4aeb2e6 | 2021-05-18 22:42:25 | [diff] [blame] | 36 | maybe( |
| 37 | http_archive, |
Keith Smiley | 914a00a | 2024-07-19 00:23:02 | [diff] [blame] | 38 | name = "rules_python", |
Nick Desaulniers | 5877e5b | 2024-12-10 21:07:52 | [diff] [blame] | 39 | sha256 = "4f7e2aa1eb9aa722d96498f5ef514f426c1f55161c3c9ae628c857a7128ceb07", |
| 40 | strip_prefix = "rules_python-1.0.0", |
| 41 | url = "https://github.com/bazelbuild/rules_python/releases/download/1.0.0/rules_python-1.0.0.tar.gz", |
Keith Smiley | 914a00a | 2024-07-19 00:23:02 | [diff] [blame] | 42 | ) |
| 43 | |
| 44 | maybe( |
| 45 | http_archive, |
Geoffrey Martin-Noble | 4aeb2e6 | 2021-05-18 22:42:25 | [diff] [blame] | 46 | name = "llvm_zlib", |
Aaron Siddhartha Mondal | a268127 | 2023-05-19 21:03:46 | [diff] [blame] | 47 | build_file = "@llvm-raw//utils/bazel/third_party_build:zlib-ng.BUILD", |
| 48 | sha256 = "e36bb346c00472a1f9ff2a0a4643e590a254be6379da7cddd9daeb9a7f296731", |
| 49 | strip_prefix = "zlib-ng-2.0.7", |
| 50 | urls = [ |
| 51 | "https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.0.7.zip", |
| 52 | ], |
Geoffrey Martin-Noble | 4aeb2e6 | 2021-05-18 22:42:25 | [diff] [blame] | 53 | ) |
| 54 | |
| 55 | maybe( |
| 56 | http_archive, |
| 57 | name = "vulkan_headers", |
Christian Sigg | 81d5412 | 2021-08-18 07:14:42 | [diff] [blame] | 58 | build_file = "@llvm-raw//utils/bazel/third_party_build:vulkan_headers.BUILD", |
Geoffrey Martin-Noble | 4aeb2e6 | 2021-05-18 22:42:25 | [diff] [blame] | 59 | sha256 = "19f491784ef0bc73caff877d11c96a48b946b5a1c805079d9006e3fbaa5c1895", |
| 60 | strip_prefix = "Vulkan-Headers-9bd3f561bcee3f01d22912de10bb07ce4e23d378", |
| 61 | urls = [ |
| 62 | "https://github.com/KhronosGroup/Vulkan-Headers/archive/9bd3f561bcee3f01d22912de10bb07ce4e23d378.tar.gz", |
| 63 | ], |
| 64 | ) |
| 65 | |
Christian Sigg | 81d5412 | 2021-08-18 07:14:42 | [diff] [blame] | 66 | load("@llvm-raw//utils/bazel:vulkan_sdk.bzl", "vulkan_sdk_setup") |
Geoffrey Martin-Noble | 4aeb2e6 | 2021-05-18 22:42:25 | [diff] [blame] | 67 | |
| 68 | maybe( |
| 69 | vulkan_sdk_setup, |
| 70 | name = "vulkan_sdk", |
| 71 | ) |
| 72 | |
Keith Smiley | 666c686 | 2024-05-10 21:20:09 | [diff] [blame] | 73 | http_archive( |
| 74 | name = "build_bazel_apple_support", |
| 75 | sha256 = "c4bb2b7367c484382300aee75be598b92f847896fb31bbd22f3a2346adf66a80", |
| 76 | url = "https://github.com/bazelbuild/apple_support/releases/download/1.15.1/apple_support.1.15.1.tar.gz", |
| 77 | ) |
| 78 | |
| 79 | load( |
| 80 | "@build_bazel_apple_support//lib:repositories.bzl", |
| 81 | "apple_support_dependencies", |
| 82 | ) |
| 83 | |
| 84 | apple_support_dependencies() |
| 85 | |
Guillaume Chatelet | d856e5f | 2022-11-18 10:14:37 | [diff] [blame] | 86 | # llvm libc math tests reply on `mpfr`. |
| 87 | # The availability of `mpfr` is controlled by a flag and can be either `disable`, `system` or `external`. |
| 88 | # Continuous integration uses `system` to speed up the build process (see .bazelrc). |
| 89 | # Otherwise by default it is set to `external`: `mpfr` and `gmp` are built from source by using `rules_foreign_cc`. |
| 90 | # Note: that building from source requires `m4` to be installed on the host machine. |
| 91 | # This is a known issue: https://github.com/bazelbuild/rules_foreign_cc/issues/755. |
| 92 | |
Jordan Rupprecht | e1d0913 | 2024-07-19 02:56:37 | [diff] [blame] | 93 | http_archive( |
Guillaume Chatelet | d856e5f | 2022-11-18 10:14:37 | [diff] [blame] | 94 | name = "rules_foreign_cc", |
Jordan Rupprecht | e1d0913 | 2024-07-19 02:56:37 | [diff] [blame] | 95 | sha256 = "4b33d62cf109bcccf286b30ed7121129cc34cf4f4ed9d8a11f38d9108f40ba74", |
| 96 | strip_prefix = "rules_foreign_cc-0.11.1", |
| 97 | url = "https://github.com/bazelbuild/rules_foreign_cc/releases/download/0.11.1/rules_foreign_cc-0.11.1.tar.gz", |
Guillaume Chatelet | d856e5f | 2022-11-18 10:14:37 | [diff] [blame] | 98 | ) |
| 99 | |
| 100 | load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies") |
Jordan Rupprecht | 4aa7769 | 2022-12-28 16:13:20 | [diff] [blame] | 101 | |
Guillaume Chatelet | d856e5f | 2022-11-18 10:14:37 | [diff] [blame] | 102 | rules_foreign_cc_dependencies() |
| 103 | |
| 104 | maybe( |
| 105 | http_archive, |
| 106 | name = "gmp", |
| 107 | build_file = "@llvm-raw//utils/bazel/third_party_build:gmp.BUILD", |
| 108 | sha256 = "fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2", |
| 109 | strip_prefix = "gmp-6.2.1", |
| 110 | urls = [ |
| 111 | "https://gmplib.org/download/gmp/gmp-6.2.1.tar.xz", |
| 112 | "https://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.xz", |
| 113 | ], |
| 114 | ) |
| 115 | |
Guillaume Chatelet | e7fb6c3 | 2022-11-21 09:38:42 | [diff] [blame] | 116 | # https://www.mpfr.org/mpfr-current/ |
Dmitri Gribenko | dd9298b | 2023-01-09 09:26:25 | [diff] [blame] | 117 | # |
| 118 | # When updating to a newer version, don't use URLs with "mpfr-current" in them. |
| 119 | # Instead, find a stable URL like the one used currently. |
Guillaume Chatelet | d856e5f | 2022-11-18 10:14:37 | [diff] [blame] | 120 | maybe( |
| 121 | http_archive, |
| 122 | name = "mpfr", |
| 123 | build_file = "@llvm-raw//utils/bazel/third_party_build:mpfr.BUILD", |
Guillaume Chatelet | e7fb6c3 | 2022-11-21 09:38:42 | [diff] [blame] | 124 | sha256 = "9cbed5d0af0d9ed5e9f8dd013e17838eb15e1db9a6ae0d371d55d35f93a782a7", |
| 125 | strip_prefix = "mpfr-4.1.1", |
Dmitri Gribenko | dd9298b | 2023-01-09 09:26:25 | [diff] [blame] | 126 | urls = ["https://www.mpfr.org/mpfr-4.1.1/mpfr-4.1.1.tar.gz"], |
Guillaume Chatelet | d856e5f | 2022-11-18 10:14:37 | [diff] [blame] | 127 | ) |
| 128 | |
Jordan Rupprecht | 4aa7769 | 2022-12-28 16:13:20 | [diff] [blame] | 129 | maybe( |
Jordan Rupprecht | e1d0913 | 2024-07-19 02:56:37 | [diff] [blame] | 130 | http_archive, |
Jorge Gorbe Moya | f9a6ea4 | 2025-03-04 19:05:01 | [diff] [blame] | 131 | name = "mpc", |
| 132 | build_file = "@llvm-raw//utils/bazel/third_party_build:mpc.BUILD", |
| 133 | sha256 = "ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8", |
| 134 | strip_prefix = "mpc-1.3.1", |
| 135 | urls = ["https://ftp.gnu.org/gnu/mpc/mpc-1.3.1.tar.gz"], |
| 136 | ) |
| 137 | |
| 138 | maybe( |
| 139 | http_archive, |
Jordan Rupprecht | 4aa7769 | 2022-12-28 16:13:20 | [diff] [blame] | 140 | name = "pfm", |
| 141 | build_file = "@llvm-raw//utils/bazel/third_party_build:pfm.BUILD", |
Jordan Rupprecht | e1d0913 | 2024-07-19 02:56:37 | [diff] [blame] | 142 | sha256 = "d18b97764c755528c1051d376e33545d0eb60c6ebf85680436813fa5b04cc3d1", |
| 143 | strip_prefix = "libpfm-4.13.0", |
| 144 | urls = ["https://versaweb.dl.sourceforge.net/project/perfmon2/libpfm4/libpfm-4.13.0.tar.gz"], |
Jordan Rupprecht | 4aa7769 | 2022-12-28 16:13:20 | [diff] [blame] | 145 | ) |
Aaron Siddhartha Mondal | 75d2032 | 2023-03-28 23:29:05 | [diff] [blame] | 146 | |
| 147 | maybe( |
| 148 | http_archive, |
| 149 | name = "llvm_zstd", |
| 150 | build_file = "@llvm-raw//utils/bazel/third_party_build:zstd.BUILD", |
| 151 | sha256 = "7c42d56fac126929a6a85dbc73ff1db2411d04f104fae9bdea51305663a83fd0", |
| 152 | strip_prefix = "zstd-1.5.2", |
| 153 | urls = [ |
Jordan Rupprecht | 2fcfc97 | 2024-02-12 19:35:17 | [diff] [blame] | 154 | "https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz", |
Aaron Siddhartha Mondal | 75d2032 | 2023-03-28 23:29:05 | [diff] [blame] | 155 | ], |
| 156 | ) |
Keith Smiley | 914a00a | 2024-07-19 00:23:02 | [diff] [blame] | 157 | |
| 158 | maybe( |
| 159 | http_archive, |
| 160 | name = "pybind11", |
| 161 | build_file = "@llvm-raw//utils/bazel/third_party_build:pybind.BUILD", |
| 162 | sha256 = "201966a61dc826f1b1879a24a3317a1ec9214a918c8eb035be2f30c3e9cfbdcb", |
| 163 | strip_prefix = "pybind11-2.10.3", |
| 164 | url = "https://github.com/pybind/pybind11/archive/v2.10.3.zip", |
| 165 | ) |
| 166 | |
Maksim Levental | 392622d | 2024-12-09 21:37:43 | [diff] [blame] | 167 | maybe( |
| 168 | http_archive, |
| 169 | name = "robin_map", |
Maksim Levental | 392622d | 2024-12-09 21:37:43 | [diff] [blame] | 170 | build_file = "@llvm-raw//utils/bazel/third_party_build:robin_map.BUILD", |
Jorge Gorbe Moya | 0e417a7 | 2025-01-16 18:12:46 | [diff] [blame] | 171 | sha256 = "a8424ad3b0affd4c57ed26f0f3d8a29604f0e1f2ef2089f497f614b1c94c7236", |
| 172 | strip_prefix = "robin-map-1.3.0", |
Maksim Levental | 392622d | 2024-12-09 21:37:43 | [diff] [blame] | 173 | url = "https://github.com/Tessil/robin-map/archive/refs/tags/v1.3.0.tar.gz", |
| 174 | ) |
| 175 | |
| 176 | maybe( |
| 177 | http_archive, |
| 178 | name = "nanobind", |
| 179 | build_file = "@llvm-raw//utils/bazel/third_party_build:nanobind.BUILD", |
Peter Hawkins | b56d1ec | 2024-12-19 02:55:42 | [diff] [blame] | 180 | sha256 = "bb35deaed7efac5029ed1e33880a415638352f757d49207a8e6013fefb6c49a7", |
| 181 | strip_prefix = "nanobind-2.4.0", |
| 182 | url = "https://github.com/wjakob/nanobind/archive/refs/tags/v2.4.0.tar.gz", |
Maksim Levental | 392622d | 2024-12-09 21:37:43 | [diff] [blame] | 183 | ) |
| 184 | |
Keith Smiley | 914a00a | 2024-07-19 00:23:02 | [diff] [blame] | 185 | load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains") |
| 186 | |
| 187 | py_repositories() |
| 188 | |
| 189 | python_register_toolchains( |
| 190 | name = "python_3_12", |
| 191 | python_version = "3.12", |
| 192 | ) |