forked from google/crubit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWORKSPACE
131 lines (110 loc) · 4.09 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
# Part of the Crubit project, under the Apache License v2.0 with LLVM
# Exceptions. See /LICENSE for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# https://github.com/bazelbuild/bazel-skylib/releases/tag/1.3.0
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.3.0/bazel-skylib-1.3.0.tar.gz",
],
)
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
bazel_skylib_workspace()
http_archive(
name = "rules_rust",
sha256 = "edb87c0d2ba70823fe3df7862676d695599314a4634b9758bd55f0e8f19c2751",
urls = [
"https://github.com/bazelbuild/rules_rust/releases/download/0.4.0/rules_rust-v0.4.0.tar.gz",
],
)
load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains")
rules_rust_dependencies()
rust_register_toolchains(
edition = "2021",
iso_date = "2022-07-07",
version = "nightly",)
load("@rules_rust//crate_universe:repositories.bzl", "crate_universe_dependencies")
crate_universe_dependencies()
load("@rules_rust//crate_universe:defs.bzl", "crate", "crates_repository", "render_config")
# after changing:
# CARGO_BAZEL_REPIN=1 bazelisk sync --only=crate_index
crates_repository(
name = "crate_index",
lockfile = "//:Cargo.Bazel.lock",
packages = {
"anyhow": crate.spec(
version = ">0.0.0",
),
"itertools": crate.spec(
version = ">0.0.0",
),
"maplit": crate.spec(
version = ">0.0.0",
),
"memoffset": crate.spec(
version = ">0.0.0",
),
"once_cell": crate.spec(
version = ">0.0.0",
),
"pin-project": crate.spec(
version = ">0.0.0",
),
"proc-macro2": crate.spec(
version = ">0.0.0",
),
"quote": crate.spec(
version = ">0.0.0",
),
"salsa": crate.spec(
version = ">0.0.0",
),
"serde": crate.spec(
features = ["derive", "rc",],
version = ">0.0.0",
),
"serde_json": crate.spec(
version = ">0.0.0",
),
"static_assertions": crate.spec(
version = ">0.0.0",
),
"syn": crate.spec(
features = ["extra-traits"],
version = ">0.0.0",
),
},
render_config = render_config(
default_package_name = "",
),
)
load("@crate_index//:defs.bzl", "crate_repositories")
crate_repositories()
# https://abseil.io/docs/cpp/quickstart#set-up-a-bazel-workspace-to-work-with-abseil
#
# From https://abseil.io/about/releases: Abseil encourages developers to “live
# at head”. 92fdbfb301f8b301b28ab5c99e7361e775c2fb8a was the head/ToT on
# 2022-08-25.
http_archive(
name = "absl",
sha256 = "feea6e761ab9df667f054531b4e4d5d143eaa78f2c40dbf5ba45289142cbcc1d",
strip_prefix = "abseil-cpp-92fdbfb301f8b301b28ab5c99e7361e775c2fb8a",
urls = ["https://github.com/abseil/abseil-cpp/archive/92fdbfb301f8b301b28ab5c99e7361e775c2fb8a.zip"],
)
# https://google.github.io/googletest/quickstart-bazel.html
http_archive(
name = "com_google_googletest",
urls = ["https://github.com/google/googletest/archive/1336c4b6d1a6f4bc6beebccb920e5ff858889292.zip"],
strip_prefix = "googletest-1336c4b6d1a6f4bc6beebccb920e5ff858889292",
sha256 = "7fda611bceb5a793824a3c63ecbf68d2389e70c38f5763e9b1d415ca24912f44"
)
# Create the "loader" repository, then use it to configure the desired LLVM
# repository. For more details, see the comment in bazel/llvm.bzl.
load("//bazel:llvm.bzl", "llvm_loader_repository_dependencies", "llvm_loader_repository")
llvm_loader_repository_dependencies()
llvm_loader_repository(name = "llvm-loader")
load("@llvm-loader//:llvm.bzl", "llvm_repository")
llvm_repository(name = "llvm-project")