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 | |
Geoffrey Martin-Noble | 8b86b3a | 2021-07-16 18:49:50 | [diff] [blame] | 8 | SKYLIB_VERSION = "1.0.3" |
| 9 | |
| 10 | http_archive( |
| 11 | name = "bazel_skylib", |
Geoffrey Martin-Noble | 91842bf | 2021-07-28 22:35:08 | [diff] [blame] | 12 | sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c", |
Geoffrey Martin-Noble | 8b86b3a | 2021-07-16 18:49:50 | [diff] [blame] | 13 | urls = [ |
| 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), |
| 16 | ], |
| 17 | ) |
| 18 | |
Christian Sigg | 81d5412 | 2021-08-18 07:14:42 | [diff] [blame^] | 19 | new_local_repository( |
| 20 | name = "llvm-raw", |
| 21 | path = "../../", |
| 22 | build_file_content = "# empty", |
Geoffrey Martin-Noble | 4aeb2e6 | 2021-05-18 22:42:25 | [diff] [blame] | 23 | ) |
| 24 | |
Christian Sigg | 81d5412 | 2021-08-18 07:14:42 | [diff] [blame^] | 25 | load("@llvm-raw//utils/bazel:configure.bzl", "llvm_configure") |
| 26 | |
| 27 | llvm_configure(name = "llvm-project") |
| 28 | |
| 29 | load("@llvm-raw//utils/bazel:terminfo.bzl", "llvm_terminfo_from_env") |
Geoffrey Martin-Noble | 4aeb2e6 | 2021-05-18 22:42:25 | [diff] [blame] | 30 | |
| 31 | maybe( |
| 32 | llvm_terminfo_from_env, |
| 33 | name = "llvm_terminfo", |
| 34 | ) |
| 35 | |
| 36 | maybe( |
| 37 | http_archive, |
| 38 | name = "zlib", |
Christian Sigg | 81d5412 | 2021-08-18 07:14:42 | [diff] [blame^] | 39 | build_file = "@llvm-raw//utils/bazel/third_party_build:zlib.BUILD", |
Geoffrey Martin-Noble | 4aeb2e6 | 2021-05-18 22:42:25 | [diff] [blame] | 40 | sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1", |
| 41 | strip_prefix = "zlib-1.2.11", |
| 42 | urls = [ |
| 43 | "https://storage.googleapis.com/mirror.tensorflow.org/zlib.net/zlib-1.2.11.tar.gz", |
| 44 | "https://zlib.net/zlib-1.2.11.tar.gz", |
| 45 | ], |
| 46 | ) |
| 47 | |
Christian Sigg | 81d5412 | 2021-08-18 07:14:42 | [diff] [blame^] | 48 | load("@llvm-raw//utils/bazel:zlib.bzl", "llvm_zlib_from_env") |
Geoffrey Martin-Noble | 4aeb2e6 | 2021-05-18 22:42:25 | [diff] [blame] | 49 | |
| 50 | maybe( |
| 51 | llvm_zlib_from_env, |
| 52 | name = "llvm_zlib", |
| 53 | external_zlib = "@zlib", |
| 54 | ) |
| 55 | |
| 56 | maybe( |
| 57 | http_archive, |
| 58 | name = "vulkan_headers", |
Christian Sigg | 81d5412 | 2021-08-18 07:14:42 | [diff] [blame^] | 59 | build_file = "@llvm-raw//utils/bazel/third_party_build:vulkan_headers.BUILD", |
Geoffrey Martin-Noble | 4aeb2e6 | 2021-05-18 22:42:25 | [diff] [blame] | 60 | sha256 = "19f491784ef0bc73caff877d11c96a48b946b5a1c805079d9006e3fbaa5c1895", |
| 61 | strip_prefix = "Vulkan-Headers-9bd3f561bcee3f01d22912de10bb07ce4e23d378", |
| 62 | urls = [ |
| 63 | "https://github.com/KhronosGroup/Vulkan-Headers/archive/9bd3f561bcee3f01d22912de10bb07ce4e23d378.tar.gz", |
| 64 | ], |
| 65 | ) |
| 66 | |
Christian Sigg | 81d5412 | 2021-08-18 07:14:42 | [diff] [blame^] | 67 | load("@llvm-raw//utils/bazel:vulkan_sdk.bzl", "vulkan_sdk_setup") |
Geoffrey Martin-Noble | 4aeb2e6 | 2021-05-18 22:42:25 | [diff] [blame] | 68 | |
| 69 | maybe( |
| 70 | vulkan_sdk_setup, |
| 71 | name = "vulkan_sdk", |
| 72 | ) |
| 73 | |
| 74 | http_archive( |
Geoffrey Martin-Noble | 4aeb2e6 | 2021-05-18 22:42:25 | [diff] [blame] | 75 | name = "bazel_toolchains", |
| 76 | sha256 = "1adf5db506a7e3c465a26988514cfc3971af6d5b3c2218925cd6e71ee443fc3f", |
| 77 | strip_prefix = "bazel-toolchains-4.0.0", |
| 78 | urls = [ |
| 79 | "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/releases/download/4.0.0/bazel-toolchains-4.0.0.tar.gz", |
| 80 | "https://github.com/bazelbuild/bazel-toolchains/releases/download/4.0.0/bazel-toolchains-4.0.0.tar.gz", |
| 81 | ], |
| 82 | ) |
| 83 | |
| 84 | load("@bazel_toolchains//rules:rbe_repo.bzl", "rbe_autoconfig") |
Geoffrey Martin-Noble | 8b86b3a | 2021-07-16 18:49:50 | [diff] [blame] | 85 | |
Geoffrey Martin-Noble | 4aeb2e6 | 2021-05-18 22:42:25 | [diff] [blame] | 86 | rbe_autoconfig(name = "rbe_default") |