-
Notifications
You must be signed in to change notification settings - Fork 6
/
WORKSPACE
164 lines (125 loc) · 5.67 KB
/
WORKSPACE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
workspace(name = "zirgen")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
http_archive(
name = "bazel_skylib",
sha256 = "74d544d96f4a5bb630d465ca8bbcfe231e3594e5aae57e1edbf17a6eb3ca2506",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.3.0.tar.gz",
],
)
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
bazel_skylib_workspace()
LLVM_COMMIT = "0d72fe9777e7c131dfb50c172b944d64437e2ece"
LLVM_SHA256 = "41f69c116fd1e25d290031c408f6ea0246cafb993b1fdab6f781c87fc0b903cf"
http_archive(
name = "llvm-raw",
build_file_content = "# empty",
sha256 = LLVM_SHA256,
strip_prefix = "llvm-project-" + LLVM_COMMIT,
urls = ["https://github.com/llvm/llvm-project/archive/{commit}.tar.gz".format(commit = LLVM_COMMIT)],
)
load("@llvm-raw//utils/bazel:configure.bzl", "llvm_configure")
llvm_configure(name = "llvm-project")
maybe(
http_archive,
name = "llvm_zlib",
build_file = "@llvm-raw//utils/bazel/third_party_build:zlib-ng.BUILD",
sha256 = "e36bb346c00472a1f9ff2a0a4643e590a254be6379da7cddd9daeb9a7f296731",
strip_prefix = "zlib-ng-2.0.7",
urls = [
"https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.0.7.zip",
],
)
maybe(
http_archive,
name = "llvm_zstd",
build_file = "@llvm-raw//utils/bazel/third_party_build:zstd.BUILD",
sha256 = "7c42d56fac126929a6a85dbc73ff1db2411d04f104fae9bdea51305663a83fd0",
strip_prefix = "zstd-1.5.2",
urls = [
"https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz",
],
)
load("//bazel/toolchain/risc0:repo.bzl", "risc0_toolchain")
risc0_toolchain(name = "risc0_toolchain")
load("//bazel/toolchain/rv32im-linux:repo.bzl", "rv32im_linux_toolchain")
rv32im_linux_toolchain(name = "rv32im_linux_toolchain")
http_archive(
name = "riscv_tests",
build_file = "//bazel/third_party:riscv_tests.BUILD",
sha256 = "831a91955287865f9c09bbb7102f7ba2987d86823fd7b67c8a62eff46e21a83c",
strip_prefix = "riscv-tests-a6ab6ae6008ffc2ea907ea9f6d2b8379583e7d56",
url = "https://github.com/riscv/riscv-tests/archive/a6ab6ae6008ffc2ea907ea9f6d2b8379583e7d56.zip",
)
http_archive(
name = "rules_conda",
patch_args = ["-p1"],
patches = ["//bazel/third_party/rules_conda:prefix.patch"],
sha256 = "9793f86162ec5cfb32a1f1f13f5bf776e2c06b243c4f1ee314b9ec870144220d",
url = "https://github.com/spietras/rules_conda/releases/download/0.1.0/rules_conda-0.1.0.zip",
)
load("@rules_conda//:defs.bzl", "conda_create", "load_conda", "register_toolchain")
load_conda(
install_mamba = True,
installer = "miniforge",
quiet = False,
)
conda_create(
name = "py3_env",
environment = "@//:environment.yml",
quiet = False,
use_mamba = True,
)
register_toolchain(py3_env = "py3_env")
register_toolchains(
"//bazel/rules/clang_format:toolchain",
)
http_archive(
name = "com_google_googletest",
sha256 = "ad7fdba11ea011c1d925b3289cf4af2c66a352e18d4c7264392fead75e919363",
strip_prefix = "googletest-1.13.0",
url = "https://github.com/google/googletest/archive/refs/tags/v1.13.0.tar.gz",
)
http_archive(
name = "rules_pkg",
sha256 = "8f9ee2dc10c1ae514ee599a8b42ed99fa262b757058f65ad3c384289ff70c4b8",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.9.1/rules_pkg-0.9.1.tar.gz",
"https://github.com/bazelbuild/rules_pkg/releases/download/0.9.1/rules_pkg-0.9.1.tar.gz",
],
)
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
rules_pkg_dependencies()
# Hedron's Compile Commands Extractor for Bazel
# https://github.com/hedronvision/bazel-compile-commands-extractor
# tip: use `bazel run @hedron_compile_commands//:refresh_all`
http_archive(
name = "hedron_compile_commands",
sha256 = "f01636585c3fb61c7c2dc74df511217cd5ad16427528ab33bc76bb34535f10a1",
strip_prefix = "bazel-compile-commands-extractor-a14ad3a64e7bf398ab48105aaa0348e032ac87f8",
url = "https://github.com/hedronvision/bazel-compile-commands-extractor/archive/a14ad3a64e7bf398ab48105aaa0348e032ac87f8.tar.gz",
)
load("@hedron_compile_commands//:workspace_setup.bzl", "hedron_compile_commands_setup")
hedron_compile_commands_setup()
load("@hedron_compile_commands//:workspace_setup_transitive.bzl", "hedron_compile_commands_setup_transitive")
hedron_compile_commands_setup_transitive()
load("@hedron_compile_commands//:workspace_setup_transitive_transitive.bzl", "hedron_compile_commands_setup_transitive_transitive")
hedron_compile_commands_setup_transitive_transitive()
load("@hedron_compile_commands//:workspace_setup_transitive_transitive_transitive.bzl", "hedron_compile_commands_setup_transitive_transitive_transitive")
hedron_compile_commands_setup_transitive_transitive_transitive()
HERMETIC_CC_TOOLCHAIN_VERSION = "v3.1.0"
http_archive(
name = "hermetic_cc_toolchain",
sha256 = "df091afc25d73b0948ed371d3d61beef29447f690508e02bc24e7001ccc12d38",
urls = [
"https://mirror.bazel.build/github.com/uber/hermetic_cc_toolchain/releases/download/{0}/hermetic_cc_toolchain-{0}.tar.gz".format(HERMETIC_CC_TOOLCHAIN_VERSION),
"https://github.com/uber/hermetic_cc_toolchain/releases/download/{0}/hermetic_cc_toolchain-{0}.tar.gz".format(HERMETIC_CC_TOOLCHAIN_VERSION),
],
)
load("@hermetic_cc_toolchain//toolchain:defs.bzl", zig_toolchains = "toolchains")
# Plain zig_toolchains() will pick reasonable defaults. See
# toolchain/defs.bzl:toolchains on how to change the Zig SDK version and
# download URL.
zig_toolchains()