xref: /llvm-project-15.0.7/utils/bazel/WORKSPACE (revision 54cc7de4)
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
88b86b3a8SGeoffrey Martin-NobleSKYLIB_VERSION = "1.0.3"
98b86b3a8SGeoffrey Martin-Noble
108b86b3a8SGeoffrey Martin-Noblehttp_archive(
118b86b3a8SGeoffrey Martin-Noble    name = "bazel_skylib",
1291842bf6SGeoffrey Martin-Noble    sha256 = "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
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
1981d54124SChristian Siggnew_local_repository(
2081d54124SChristian Sigg    name = "llvm-raw",
2181d54124SChristian Sigg    path = "../../",
2281d54124SChristian Sigg    build_file_content = "# empty",
234aeb2e60SGeoffrey Martin-Noble)
244aeb2e60SGeoffrey Martin-Noble
2581d54124SChristian Siggload("@llvm-raw//utils/bazel:configure.bzl", "llvm_configure")
2681d54124SChristian Sigg
2781d54124SChristian Siggllvm_configure(name = "llvm-project")
2881d54124SChristian Sigg
2981d54124SChristian Siggload("@llvm-raw//utils/bazel:terminfo.bzl", "llvm_terminfo_from_env")
304aeb2e60SGeoffrey Martin-Noble
314aeb2e60SGeoffrey Martin-Noblemaybe(
324aeb2e60SGeoffrey Martin-Noble    llvm_terminfo_from_env,
334aeb2e60SGeoffrey Martin-Noble    name = "llvm_terminfo",
344aeb2e60SGeoffrey Martin-Noble)
354aeb2e60SGeoffrey Martin-Noble
364aeb2e60SGeoffrey Martin-Noblemaybe(
374aeb2e60SGeoffrey Martin-Noble    http_archive,
384aeb2e60SGeoffrey Martin-Noble    name = "zlib",
3981d54124SChristian Sigg    build_file = "@llvm-raw//utils/bazel/third_party_build:zlib.BUILD",
40*54cc7de4SJorge Gorbe Moya    sha256 = "91844808532e5ce316b3c010929493c0244f3d37593afd6de04f71821d5136d9",
41224e9be1SGeoffrey Martin-Noble    strip_prefix = "zlib-1.2.12",
424aeb2e60SGeoffrey Martin-Noble    urls = [
43224e9be1SGeoffrey Martin-Noble        "https://storage.googleapis.com/mirror.tensorflow.org/zlib.net/zlib-1.2.12.tar.gz",
44224e9be1SGeoffrey Martin-Noble        "https://zlib.net/zlib-1.2.12.tar.gz",
454aeb2e60SGeoffrey Martin-Noble    ],
464aeb2e60SGeoffrey Martin-Noble)
474aeb2e60SGeoffrey Martin-Noble
4881d54124SChristian Siggload("@llvm-raw//utils/bazel:zlib.bzl", "llvm_zlib_from_env")
494aeb2e60SGeoffrey Martin-Noble
504aeb2e60SGeoffrey Martin-Noblemaybe(
514aeb2e60SGeoffrey Martin-Noble    llvm_zlib_from_env,
524aeb2e60SGeoffrey Martin-Noble    name = "llvm_zlib",
534aeb2e60SGeoffrey Martin-Noble    external_zlib = "@zlib",
544aeb2e60SGeoffrey Martin-Noble)
554aeb2e60SGeoffrey Martin-Noble
564aeb2e60SGeoffrey Martin-Noblemaybe(
574aeb2e60SGeoffrey Martin-Noble    http_archive,
584aeb2e60SGeoffrey Martin-Noble    name = "vulkan_headers",
5981d54124SChristian Sigg    build_file = "@llvm-raw//utils/bazel/third_party_build:vulkan_headers.BUILD",
604aeb2e60SGeoffrey Martin-Noble    sha256 = "19f491784ef0bc73caff877d11c96a48b946b5a1c805079d9006e3fbaa5c1895",
614aeb2e60SGeoffrey Martin-Noble    strip_prefix = "Vulkan-Headers-9bd3f561bcee3f01d22912de10bb07ce4e23d378",
624aeb2e60SGeoffrey Martin-Noble    urls = [
634aeb2e60SGeoffrey Martin-Noble        "https://github.com/KhronosGroup/Vulkan-Headers/archive/9bd3f561bcee3f01d22912de10bb07ce4e23d378.tar.gz",
644aeb2e60SGeoffrey Martin-Noble    ],
654aeb2e60SGeoffrey Martin-Noble)
664aeb2e60SGeoffrey Martin-Noble
6781d54124SChristian Siggload("@llvm-raw//utils/bazel:vulkan_sdk.bzl", "vulkan_sdk_setup")
684aeb2e60SGeoffrey Martin-Noble
694aeb2e60SGeoffrey Martin-Noblemaybe(
704aeb2e60SGeoffrey Martin-Noble    vulkan_sdk_setup,
714aeb2e60SGeoffrey Martin-Noble    name = "vulkan_sdk",
724aeb2e60SGeoffrey Martin-Noble)
734aeb2e60SGeoffrey Martin-Noble
744aeb2e60SGeoffrey Martin-Noblehttp_archive(
754aeb2e60SGeoffrey Martin-Noble    name = "bazel_toolchains",
764aeb2e60SGeoffrey Martin-Noble    sha256 = "1adf5db506a7e3c465a26988514cfc3971af6d5b3c2218925cd6e71ee443fc3f",
774aeb2e60SGeoffrey Martin-Noble    strip_prefix = "bazel-toolchains-4.0.0",
784aeb2e60SGeoffrey Martin-Noble    urls = [
794aeb2e60SGeoffrey Martin-Noble        "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/releases/download/4.0.0/bazel-toolchains-4.0.0.tar.gz",
804aeb2e60SGeoffrey Martin-Noble        "https://github.com/bazelbuild/bazel-toolchains/releases/download/4.0.0/bazel-toolchains-4.0.0.tar.gz",
814aeb2e60SGeoffrey Martin-Noble    ],
824aeb2e60SGeoffrey Martin-Noble)
834aeb2e60SGeoffrey Martin-Noble
844aeb2e60SGeoffrey Martin-Nobleload("@bazel_toolchains//rules:rbe_repo.bzl", "rbe_autoconfig")
858b86b3a8SGeoffrey Martin-Noble
864aeb2e60SGeoffrey Martin-Noblerbe_autoconfig(name = "rbe_default")
87