forked from google/heir
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMODULE.bazel
85 lines (69 loc) · 3.07 KB
/
MODULE.bazel
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
module(name = "heir")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
# Gazelle puglin for BUILD file autogeneration
bazel_dep(name = "gazelle", version = "0.42.0")
bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.7.1", dev_dependency = True)
# provides the `license` rule, which is required because llvm's gentbl_rule
# implicitly depends upon the target '//:license'. How bizarre.
bazel_dep(name = "rules_license", version = "1.0.0")
# rules_foreign_cc provides access to a `make` bazel rule, which is needed
# to build yosys
bazel_dep(name = "rules_foreign_cc", version = "0.14.0")
bazel_dep(name = "rules_cc", version = "0.1.1")
bazel_dep(name = "rules_go", version = "0.53.0")
bazel_dep(name = "rules_python", version = "1.1.0")
bazel_dep(name = "googletest", version = "1.16.0")
bazel_dep(name = "google_benchmark", version = "1.9.1")
bazel_dep(name = "abseil-cpp", version = "20250127.0", repo_name = "com_google_absl")
bazel_dep(name = "eigen", version = "4.0.0-20241125.bcr.1")
# needed as transitive deps of yosys
bazel_dep(name = "rules_flex", version = "0.3")
bazel_dep(name = "rules_bison", version = "0.3")
# https://github.com/or-tools/bazel_or-tools/issues/2
# bazel_dep(name = "ortools", version = "9.12", repo_name = "com_google_ortools")
# needed as transitive deps of or-tools until or tools is in the bazel registry
bazel_dep(name = "protobuf", version = "29.3", repo_name = "com_google_protobuf")
bazel_dep(name = "rules_proto", version = "7.1.0")
bazel_dep(name = "rules_java", version = "8.9.0")
bazel_dep(name = "zlib", version = "1.3.1.bcr.5")
# Hermetic python setup
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
python.toolchain(python_version = "3.11")
pip.parse(
hub_name = "heir_pip_deps",
python_version = "3.11",
requirements_lock = "//:requirements.txt",
)
pip.parse(
hub_name = "frontend_pip_deps",
python_version = "3.11",
requirements_lock = "//frontend:requirements.txt",
)
use_repo(python, python_3_11 = "python_3_11")
use_repo(pip, "heir_pip_deps")
use_repo(pip, "frontend_pip_deps")
# Go setup
go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
# All *direct* Go dependencies of the module have to be listed explicitly.
use_repo(
go_deps,
"com_github_tuneinsight_lattigo_v6",
)
# compile_commands extracts the relevant compile data from bazel into
# `compile_commands.json` so that clangd, clang-tidy, etc., can use it.
# Whenever a build file changes, you must re-run
#
# bazel run @hedron_compile_commands//:refresh_all
#
# to ingest new data into these tools.
#
# See the project repo for more details and configuration options
# https://github.com/hedronvision/bazel-compile-commands-extractor
bazel_dep(name = "hedron_compile_commands", dev_dependency = True)
git_override(
module_name = "hedron_compile_commands",
commit = "4f28899228fb3ad0126897876f147ca15026151e", # v5.0.0
remote = "https://github.com/hedronvision/bazel-compile-commands-extractor.git",
)