-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMODULE.bazel
More file actions
157 lines (145 loc) · 3.88 KB
/
Copy pathMODULE.bazel
File metadata and controls
157 lines (145 loc) · 3.88 KB
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
# Copyright 2026 The OpenGrm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Module file for Bazel build system for OpenGrm.
#
# See https://registry.bazel.build/ for central Bazel package registry.
module(
name = "opengrm",
bazel_compatibility = [">=8.0.0"],
)
# Bazel core modules providing rules.
bazel_dep(
name = "bazel_skylib",
version = "1.9.0",
)
# NOTE: GCC toolchains are broken with Bazel 9.
# TODO: Update to 0.9.0.bcr.1 when
# https://github.com/bazelbuild/bazel-central-registry/pull/7391
# is merged.
bazel_dep(
name = "gcc_toolchain",
version = "0.9.0",
)
bazel_dep(
name = "rules_cc",
version = "0.2.22",
)
bazel_dep(
name = "rules_python",
version = "2.2.0",
)
bazel_dep(
name = "rules_bison",
version = "0.4.bcr.1"
)
bazel_dep(
name = "rules_m4",
version = "0.3.bcr.1"
)
bazel_dep(
name = "rules_shell",
version = "0.8.0",
)
bazel_dep(
name = "platforms",
version = "1.1.0",
)
bazel_dep(
name = "rules_license",
version = "1.0.0",
)
bazel_dep(
name = "toolchains_llvm",
version = "1.6.0",
)
bazel_dep(
name = "cython",
version = "3.2.8",
)
# Module extensions.
# GCC
gcc = use_extension("@gcc_toolchain//toolchain:module_extensions.bzl", "gcc_toolchains")
# We would like to support 7.5.0, but the lowest version available via
# bzlmod is 12.5.0.
# https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md#compilers-tools-build-systems
gcc.toolchain(
name = "gcc_toolchain_old",
gcc_version = "12.5.0",
target_arch = "x86_64",
extra_ldflags = ["-lstdc++"],
)
use_repo(gcc, "gcc_toolchain_old")
# Current version.
# https://gcc.gnu.org/releases.html
gcc.toolchain(
name = "gcc_toolchain_cur",
gcc_version = "15.2.0",
target_arch = "x86_64",
extra_ldflags = ["-lstdc++"],
)
use_repo(gcc, "gcc_toolchain_cur")
# LLVM
llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm")
# Lowest supported clang version.
llvm.toolchain(
name = "llvm_toolchain_old",
llvm_version = "14.0.0",
)
use_repo(llvm, "llvm_toolchain_old")
# Latest downloadable release.
# https://releases.llvm.org/
llvm.toolchain(
name = "llvm_toolchain_cur",
llvm_version = "20.1.0",
)
use_repo(llvm, "llvm_toolchain_cur")
# Note we're not using `register_toolchain()`; `--extra_toolchains` is
# configured in `.bazelrc`.
# Prod dependencies.
bazel_dep(
name = "abseil-cpp",
version = "20260526.0",
repo_name = "com_google_absl",
)
bazel_dep( # For Thrax `rewrite-tester`.
name = "readline",
version = "8.3.bcr.1"
)
bazel_dep(
name = "abseil-py",
version = "2.4.0",
repo_name = "com_google_absl_py",
)
bazel_dep(
name = "protobuf",
version = "35.1",
repo_name = "com_google_protobuf"
)
# Some modules are not yet available in the bazel central registry. We define
# a dummy module and then use `git_override` to point it at the specific commit
# in the respective github repo.
OPENFST_COMMIT = "a676239535d308e7351d130ced3fdf6c2faec497" # 07/08/26.
bazel_dep(name = "openfst", version = "0.0.0", repo_name = "com_google_openfst")
git_override(
module_name = "openfst",
remote = "https://github.com/google-research/openfst.git",
commit = OPENFST_COMMIT,
)
# Dev dependencies.
bazel_dep(
name = "googletest",
version = "1.17.0.bcr.2",
dev_dependency = True,
repo_name = "com_google_googletest",
)