blob: 2cd66907626d671c422cd7d13c839eb177b7725b [file] [log] [blame]
Geoffrey Martin-Noble552d3f82021-05-25 17:56:09 -07001# Copyright 2019 The IREE Authors
Geoffrey Martin-Noble15545b42019-11-09 16:40:38 -08002#
Geoffrey Martin-Noble552d3f82021-05-25 17:56:09 -07003# Licensed under the Apache License v2.0 with LLVM Exceptions.
4# See https://llvm.org/LICENSE.txt for license information.
5# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Geoffrey Martin-Noble15545b42019-11-09 16:40:38 -08006
Stella Laurenzo1128d502019-10-07 14:34:41 -07007# Workspace file for the IREE project.
Stella Laurenzoc4a6edf2019-10-17 16:59:08 -07008# buildozer: disable=positional-args
9
10workspace(name = "iree_core")
Stella Laurenzo196ad742019-10-09 10:33:08 -070011
12load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
Scott Todd69655bc2020-11-30 16:28:52 -080013load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
Stella Laurenzo196ad742019-10-09 10:33:08 -070014
Stella Laurenzoc4a6edf2019-10-17 16:59:08 -070015###############################################################################
Stella Laurenzoe7d9e882019-10-10 14:32:38 -070016# Skylib
Stella Laurenzoe7d9e882019-10-10 14:32:38 -070017http_archive(
18 name = "bazel_skylib",
Lei Zhangb8bc9c92022-09-28 00:19:11 -040019 sha256 = "74d544d96f4a5bb630d465ca8bbcfe231e3594e5aae57e1edbf17a6eb3ca2506",
Stella Laurenzoe7d9e882019-10-10 14:32:38 -070020 urls = [
Lei Zhangb8bc9c92022-09-28 00:19:11 -040021 "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz",
22 "https://github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz",
Stella Laurenzoe7d9e882019-10-10 14:32:38 -070023 ],
Stella Laurenzoe7d9e882019-10-10 14:32:38 -070024)
Geoffrey Martin-Noble645a88b2020-07-13 09:40:59 -070025
Stella Laurenzoe7d9e882019-10-10 14:32:38 -070026load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
Geoffrey Martin-Noble645a88b2020-07-13 09:40:59 -070027
Stella Laurenzoe7d9e882019-10-10 14:32:38 -070028bazel_skylib_workspace()
29###############################################################################
30
31###############################################################################
Stella Laurenzo15d8ae42020-01-03 13:52:12 -080032# llvm-project
Geoffrey Martin-Noble10b3e1e2020-10-27 10:04:35 -070033
Geoffrey Martin-Noble77285732021-08-18 18:18:34 -070034new_local_repository(
35 name = "llvm-raw",
36 build_file_content = "# empty",
37 path = "third_party/llvm-project",
Geoffrey Martin-Noble10b3e1e2020-10-27 10:04:35 -070038)
39
Manish Guptad3677412023-05-25 08:24:08 -070040load("@llvm-raw//utils/bazel:configure.bzl", "llvm_configure")
Geoffrey Martin-Noble10b3e1e2020-10-27 10:04:35 -070041
Scott Todd0636abd2024-09-18 18:58:34 -070042llvm_configure(
43 name = "llvm-project",
44 # Keep this in sync with the targets in iree_llvm.cmake.
45 targets = [
46 "AArch64",
47 "ARM",
48 "RISCV",
49 "X86",
50 "NVPTX",
51 "AMDGPU",
52 "WebAssembly",
53 ],
54)
Geoffrey Martin-Noble10b3e1e2020-10-27 10:04:35 -070055
Stella Laurenzo15d8ae42020-01-03 13:52:12 -080056###############################################################################
57
58###############################################################################
Geoffrey Martin-Noblef5b323e2021-01-12 18:32:08 -080059# All other IREE submodule dependencies
Scott Todd0d416202019-11-12 16:22:05 -080060
Stella Laurenzoa9d23f62022-12-27 17:28:58 -080061load("//build_tools/bazel:workspace.bzl", "configure_iree_cuda_deps", "configure_iree_submodule_deps")
Geoffrey Martin-Noblef5b323e2021-01-12 18:32:08 -080062
63configure_iree_submodule_deps()
Scott Todd5404ad72024-06-06 09:58:23 -070064
Stella Laurenzoa9d23f62022-12-27 17:28:58 -080065configure_iree_cuda_deps()
Nicolas Vasilache90baf392023-03-30 19:23:05 +020066
67###############################################################################
68maybe(
69 http_archive,
Manish Guptad3677412023-05-25 08:24:08 -070070 name = "llvm_zlib",
71 build_file = "@llvm-raw//utils/bazel/third_party_build:zlib-ng.BUILD",
72 sha256 = "e36bb346c00472a1f9ff2a0a4643e590a254be6379da7cddd9daeb9a7f296731",
73 strip_prefix = "zlib-ng-2.0.7",
74 urls = [
75 "https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.0.7.zip",
76 ],
77)
78
79###############################################################################
80maybe(
81 http_archive,
Nicolas Vasilache90baf392023-03-30 19:23:05 +020082 name = "llvm_zstd",
83 build_file = "@llvm-raw//utils/bazel/third_party_build:zstd.BUILD",
84 sha256 = "7c42d56fac126929a6a85dbc73ff1db2411d04f104fae9bdea51305663a83fd0",
85 strip_prefix = "zstd-1.5.2",
86 urls = [
Scott Todd5404ad72024-06-06 09:58:23 -070087 "https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz",
Nicolas Vasilache90baf392023-03-30 19:23:05 +020088 ],
89)