14aeb2e60SGeoffrey Martin-Noble# This file is licensed under the Apache License v2.0 with LLVM Exceptions. 24aeb2e60SGeoffrey Martin-Noble# See https://llvm.org/LICENSE.txt for license information. 34aeb2e60SGeoffrey Martin-Noble# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 44aeb2e60SGeoffrey Martin-Noble 54aeb2e60SGeoffrey Martin-Nobleload("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") 64aeb2e60SGeoffrey Martin-Nobleload("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") 74aeb2e60SGeoffrey Martin-Noble 8*0e417a70SJorge Gorbe MoyaSKYLIB_VERSION = "1.7.1" 98b86b3a8SGeoffrey Martin-Noble 108b86b3a8SGeoffrey Martin-Noblehttp_archive( 118b86b3a8SGeoffrey Martin-Noble name = "bazel_skylib", 12*0e417a70SJorge Gorbe Moya sha256 = "bc283cdfcd526a52c3201279cda4bc298652efa898b10b4db0837dc51652756f", 138b86b3a8SGeoffrey Martin-Noble urls = [ 148b86b3a8SGeoffrey Martin-Noble "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version = SKYLIB_VERSION), 158b86b3a8SGeoffrey Martin-Noble "https://github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version = SKYLIB_VERSION), 168b86b3a8SGeoffrey Martin-Noble ], 178b86b3a8SGeoffrey Martin-Noble) 188b86b3a8SGeoffrey Martin-Noble 195877e5bdSNick Desaulniershttp_archive( 205877e5bdSNick Desaulniers name = "rules_cc", 215877e5bdSNick Desaulniers sha256 = "abc605dd850f813bb37004b77db20106a19311a96b2da1c92b789da529d28fe1", 225877e5bdSNick Desaulniers strip_prefix = "rules_cc-0.0.17", 23*0e417a70SJorge Gorbe Moya urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.17/rules_cc-0.0.17.tar.gz"], 245877e5bdSNick Desaulniers) 255877e5bdSNick Desaulniers 2681d54124SChristian Siggnew_local_repository( 2781d54124SChristian Sigg name = "llvm-raw", 2881d54124SChristian Sigg build_file_content = "# empty", 294aa77690SJordan Rupprecht path = "../../", 304aeb2e60SGeoffrey Martin-Noble) 314aeb2e60SGeoffrey Martin-Noble 3281d54124SChristian Siggload("@llvm-raw//utils/bazel:configure.bzl", "llvm_configure") 3381d54124SChristian Sigg 3481d54124SChristian Siggllvm_configure(name = "llvm-project") 3581d54124SChristian Sigg 364aeb2e60SGeoffrey Martin-Noblemaybe( 374aeb2e60SGeoffrey Martin-Noble http_archive, 38914a00a9SKeith Smiley name = "rules_python", 395877e5bdSNick Desaulniers sha256 = "4f7e2aa1eb9aa722d96498f5ef514f426c1f55161c3c9ae628c857a7128ceb07", 405877e5bdSNick Desaulniers strip_prefix = "rules_python-1.0.0", 415877e5bdSNick Desaulniers url = "https://github.com/bazelbuild/rules_python/releases/download/1.0.0/rules_python-1.0.0.tar.gz", 42914a00a9SKeith Smiley) 43914a00a9SKeith Smiley 44914a00a9SKeith Smileymaybe( 45914a00a9SKeith Smiley http_archive, 464aeb2e60SGeoffrey Martin-Noble name = "llvm_zlib", 47a2681277SAaron Siddhartha Mondal build_file = "@llvm-raw//utils/bazel/third_party_build:zlib-ng.BUILD", 48a2681277SAaron Siddhartha Mondal sha256 = "e36bb346c00472a1f9ff2a0a4643e590a254be6379da7cddd9daeb9a7f296731", 49a2681277SAaron Siddhartha Mondal strip_prefix = "zlib-ng-2.0.7", 50a2681277SAaron Siddhartha Mondal urls = [ 51a2681277SAaron Siddhartha Mondal "https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.0.7.zip", 52a2681277SAaron Siddhartha Mondal ], 534aeb2e60SGeoffrey Martin-Noble) 544aeb2e60SGeoffrey Martin-Noble 554aeb2e60SGeoffrey Martin-Noblemaybe( 564aeb2e60SGeoffrey Martin-Noble http_archive, 574aeb2e60SGeoffrey Martin-Noble name = "vulkan_headers", 5881d54124SChristian Sigg build_file = "@llvm-raw//utils/bazel/third_party_build:vulkan_headers.BUILD", 594aeb2e60SGeoffrey Martin-Noble sha256 = "19f491784ef0bc73caff877d11c96a48b946b5a1c805079d9006e3fbaa5c1895", 604aeb2e60SGeoffrey Martin-Noble strip_prefix = "Vulkan-Headers-9bd3f561bcee3f01d22912de10bb07ce4e23d378", 614aeb2e60SGeoffrey Martin-Noble urls = [ 624aeb2e60SGeoffrey Martin-Noble "https://github.com/KhronosGroup/Vulkan-Headers/archive/9bd3f561bcee3f01d22912de10bb07ce4e23d378.tar.gz", 634aeb2e60SGeoffrey Martin-Noble ], 644aeb2e60SGeoffrey Martin-Noble) 654aeb2e60SGeoffrey Martin-Noble 6681d54124SChristian Siggload("@llvm-raw//utils/bazel:vulkan_sdk.bzl", "vulkan_sdk_setup") 674aeb2e60SGeoffrey Martin-Noble 684aeb2e60SGeoffrey Martin-Noblemaybe( 694aeb2e60SGeoffrey Martin-Noble vulkan_sdk_setup, 704aeb2e60SGeoffrey Martin-Noble name = "vulkan_sdk", 714aeb2e60SGeoffrey Martin-Noble) 724aeb2e60SGeoffrey Martin-Noble 73666c686dSKeith Smileyhttp_archive( 74666c686dSKeith Smiley name = "build_bazel_apple_support", 75666c686dSKeith Smiley sha256 = "c4bb2b7367c484382300aee75be598b92f847896fb31bbd22f3a2346adf66a80", 76666c686dSKeith Smiley url = "https://github.com/bazelbuild/apple_support/releases/download/1.15.1/apple_support.1.15.1.tar.gz", 77666c686dSKeith Smiley) 78666c686dSKeith Smiley 79666c686dSKeith Smileyload( 80666c686dSKeith Smiley "@build_bazel_apple_support//lib:repositories.bzl", 81666c686dSKeith Smiley "apple_support_dependencies", 82666c686dSKeith Smiley) 83666c686dSKeith Smiley 84666c686dSKeith Smileyapple_support_dependencies() 85666c686dSKeith Smiley 86d856e5feSGuillaume Chatelet# llvm libc math tests reply on `mpfr`. 87d856e5feSGuillaume Chatelet# The availability of `mpfr` is controlled by a flag and can be either `disable`, `system` or `external`. 88d856e5feSGuillaume Chatelet# Continuous integration uses `system` to speed up the build process (see .bazelrc). 89d856e5feSGuillaume Chatelet# Otherwise by default it is set to `external`: `mpfr` and `gmp` are built from source by using `rules_foreign_cc`. 90d856e5feSGuillaume Chatelet# Note: that building from source requires `m4` to be installed on the host machine. 91d856e5feSGuillaume Chatelet# This is a known issue: https://github.com/bazelbuild/rules_foreign_cc/issues/755. 92d856e5feSGuillaume Chatelet 93e1d0913aSJordan Rupprechthttp_archive( 94d856e5feSGuillaume Chatelet name = "rules_foreign_cc", 95e1d0913aSJordan Rupprecht sha256 = "4b33d62cf109bcccf286b30ed7121129cc34cf4f4ed9d8a11f38d9108f40ba74", 96e1d0913aSJordan Rupprecht strip_prefix = "rules_foreign_cc-0.11.1", 97e1d0913aSJordan Rupprecht url = "https://github.com/bazelbuild/rules_foreign_cc/releases/download/0.11.1/rules_foreign_cc-0.11.1.tar.gz", 98d856e5feSGuillaume Chatelet) 99d856e5feSGuillaume Chatelet 100d856e5feSGuillaume Chateletload("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies") 1014aa77690SJordan Rupprecht 102d856e5feSGuillaume Chateletrules_foreign_cc_dependencies() 103d856e5feSGuillaume Chatelet 104d856e5feSGuillaume Chateletmaybe( 105d856e5feSGuillaume Chatelet http_archive, 106d856e5feSGuillaume Chatelet name = "gmp", 107d856e5feSGuillaume Chatelet build_file = "@llvm-raw//utils/bazel/third_party_build:gmp.BUILD", 108d856e5feSGuillaume Chatelet sha256 = "fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2", 109d856e5feSGuillaume Chatelet strip_prefix = "gmp-6.2.1", 110d856e5feSGuillaume Chatelet urls = [ 111d856e5feSGuillaume Chatelet "https://gmplib.org/download/gmp/gmp-6.2.1.tar.xz", 112d856e5feSGuillaume Chatelet "https://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.xz", 113d856e5feSGuillaume Chatelet ], 114d856e5feSGuillaume Chatelet) 115d856e5feSGuillaume Chatelet 116e7fb6c39SGuillaume Chatelet# https://www.mpfr.org/mpfr-current/ 117dd9298baSDmitri Gribenko# 118dd9298baSDmitri Gribenko# When updating to a newer version, don't use URLs with "mpfr-current" in them. 119dd9298baSDmitri Gribenko# Instead, find a stable URL like the one used currently. 120d856e5feSGuillaume Chateletmaybe( 121d856e5feSGuillaume Chatelet http_archive, 122d856e5feSGuillaume Chatelet name = "mpfr", 123d856e5feSGuillaume Chatelet build_file = "@llvm-raw//utils/bazel/third_party_build:mpfr.BUILD", 124e7fb6c39SGuillaume Chatelet sha256 = "9cbed5d0af0d9ed5e9f8dd013e17838eb15e1db9a6ae0d371d55d35f93a782a7", 125e7fb6c39SGuillaume Chatelet strip_prefix = "mpfr-4.1.1", 126dd9298baSDmitri Gribenko urls = ["https://www.mpfr.org/mpfr-4.1.1/mpfr-4.1.1.tar.gz"], 127d856e5feSGuillaume Chatelet) 128d856e5feSGuillaume Chatelet 1294aa77690SJordan Rupprechtmaybe( 130e1d0913aSJordan Rupprecht http_archive, 1314aa77690SJordan Rupprecht name = "pfm", 1324aa77690SJordan Rupprecht build_file = "@llvm-raw//utils/bazel/third_party_build:pfm.BUILD", 133e1d0913aSJordan Rupprecht sha256 = "d18b97764c755528c1051d376e33545d0eb60c6ebf85680436813fa5b04cc3d1", 134e1d0913aSJordan Rupprecht strip_prefix = "libpfm-4.13.0", 135e1d0913aSJordan Rupprecht urls = ["https://versaweb.dl.sourceforge.net/project/perfmon2/libpfm4/libpfm-4.13.0.tar.gz"], 1364aa77690SJordan Rupprecht) 13775d2032eSAaron Siddhartha Mondal 13875d2032eSAaron Siddhartha Mondalmaybe( 13975d2032eSAaron Siddhartha Mondal http_archive, 14075d2032eSAaron Siddhartha Mondal name = "llvm_zstd", 14175d2032eSAaron Siddhartha Mondal build_file = "@llvm-raw//utils/bazel/third_party_build:zstd.BUILD", 14275d2032eSAaron Siddhartha Mondal sha256 = "7c42d56fac126929a6a85dbc73ff1db2411d04f104fae9bdea51305663a83fd0", 14375d2032eSAaron Siddhartha Mondal strip_prefix = "zstd-1.5.2", 14475d2032eSAaron Siddhartha Mondal urls = [ 1452fcfc975SJordan Rupprecht "https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz", 14675d2032eSAaron Siddhartha Mondal ], 14775d2032eSAaron Siddhartha Mondal) 148914a00a9SKeith Smiley 149914a00a9SKeith Smileymaybe( 150914a00a9SKeith Smiley http_archive, 151914a00a9SKeith Smiley name = "pybind11", 152914a00a9SKeith Smiley build_file = "@llvm-raw//utils/bazel/third_party_build:pybind.BUILD", 153914a00a9SKeith Smiley sha256 = "201966a61dc826f1b1879a24a3317a1ec9214a918c8eb035be2f30c3e9cfbdcb", 154914a00a9SKeith Smiley strip_prefix = "pybind11-2.10.3", 155914a00a9SKeith Smiley url = "https://github.com/pybind/pybind11/archive/v2.10.3.zip", 156914a00a9SKeith Smiley) 157914a00a9SKeith Smiley 158392622d0SMaksim Leventalmaybe( 159392622d0SMaksim Levental http_archive, 160392622d0SMaksim Levental name = "robin_map", 161392622d0SMaksim Levental build_file = "@llvm-raw//utils/bazel/third_party_build:robin_map.BUILD", 162*0e417a70SJorge Gorbe Moya sha256 = "a8424ad3b0affd4c57ed26f0f3d8a29604f0e1f2ef2089f497f614b1c94c7236", 163*0e417a70SJorge Gorbe Moya strip_prefix = "robin-map-1.3.0", 164392622d0SMaksim Levental url = "https://github.com/Tessil/robin-map/archive/refs/tags/v1.3.0.tar.gz", 165392622d0SMaksim Levental) 166392622d0SMaksim Levental 167392622d0SMaksim Leventalmaybe( 168392622d0SMaksim Levental http_archive, 169392622d0SMaksim Levental name = "nanobind", 170392622d0SMaksim Levental build_file = "@llvm-raw//utils/bazel/third_party_build:nanobind.BUILD", 171b56d1ec6SPeter Hawkins sha256 = "bb35deaed7efac5029ed1e33880a415638352f757d49207a8e6013fefb6c49a7", 172b56d1ec6SPeter Hawkins strip_prefix = "nanobind-2.4.0", 173b56d1ec6SPeter Hawkins url = "https://github.com/wjakob/nanobind/archive/refs/tags/v2.4.0.tar.gz", 174392622d0SMaksim Levental) 175392622d0SMaksim Levental 176914a00a9SKeith Smileyload("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains") 177914a00a9SKeith Smiley 178914a00a9SKeith Smileypy_repositories() 179914a00a9SKeith Smiley 180914a00a9SKeith Smileypython_register_toolchains( 181914a00a9SKeith Smiley name = "python_3_12", 182914a00a9SKeith Smiley python_version = "3.12", 183914a00a9SKeith Smiley) 184