-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2121 from lromor/bzlmod_bazel_7
bazel: migrate to bazelmod and bazel 7
- Loading branch information
Showing
5 changed files
with
644 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
module( | ||
name = "verible", | ||
) | ||
|
||
bazel_dep(name = "platforms", version = "0.0.8") | ||
bazel_dep(name = "bazel_skylib", version = "1.5.0") | ||
|
||
bazel_dep(name = "rules_license", version = "0.0.8") | ||
bazel_dep(name = "rules_proto", version = "6.0.0-rc2") | ||
bazel_dep(name = "rules_cc", version = "0.0.9") | ||
|
||
# Register m4 rules and toolchain. | ||
bazel_dep(name = "rules_m4", version = "0.2.3") | ||
m4 = use_extension( | ||
"@rules_m4//m4/extensions:m4_repository_ext.bzl", | ||
"m4_repository_ext", | ||
) | ||
m4.repository( | ||
name = "m4", | ||
version = "1.4.18", | ||
extra_copts = ["-O3"], | ||
) | ||
use_repo(m4, "m4") | ||
register_toolchains("@m4//:toolchain") | ||
|
||
# Register bison rules and toolchain. | ||
bazel_dep(name = "rules_bison", version = "0.2.2") | ||
bison = use_extension( | ||
"@rules_bison//bison/extensions:bison_repository_ext.bzl", | ||
"bison_repository_ext", | ||
) | ||
bison.repository( | ||
name = "bison", | ||
version = "3.3.2", | ||
extra_copts = ["-O3"], | ||
) | ||
use_repo(bison, "bison") | ||
register_toolchains("@bison//:toolchain") | ||
|
||
# Register flex rules and toolchain. | ||
bazel_dep(name = "rules_flex", version = "0.2.1") | ||
flex = use_extension( | ||
"@rules_flex//flex/extensions:flex_repository_ext.bzl", | ||
"flex_repository_ext", | ||
) | ||
flex.repository( | ||
name = "flex", | ||
version = "2.6.4", | ||
extra_copts = ["-O3"], | ||
) | ||
use_repo(flex, "flex") | ||
register_toolchains("@flex//:toolchain") | ||
|
||
bazel_dep(name = "abseil-cpp", version = "20240116.1", repo_name="com_google_absl") | ||
single_version_override( | ||
module_name = "abseil-cpp", | ||
patch_strip = 1, | ||
version = "20240116.1", | ||
patches = ["//bazel:absl.patch"], | ||
) | ||
|
||
bazel_dep(name = "re2", version = "2023-09-01", repo_name="com_googlesource_code_re2") | ||
bazel_dep(name = "googletest", version = "1.14.0.bcr.1", repo_name="com_google_googletest") | ||
|
||
bazel_dep(name = "protobuf", version = "25.2", repo_name="com_google_protobuf") | ||
# This override can be removed once https://registry.bazel.build/modules/protobuf | ||
# supports a compatible protobuf version for abseil. | ||
archive_override( | ||
module_name = "protobuf", | ||
urls = [ | ||
"https://github.com/protocolbuffers/protobuf/releases/download/v25.2/protobuf-25.2.tar.gz", | ||
], | ||
strip_prefix="protobuf-25.2", | ||
integrity = "sha256-j/URpk/EbueS0/5JpaG8rW99xQ37uloosOW5ecF/mHE=", | ||
patches = [ | ||
"//bazel:proto-add-module-bazel.patch", | ||
], | ||
patch_strip = 1, | ||
) | ||
|
||
bazel_dep(name = "nlohmann_json", version = "3.11.3", repo_name="jsonhpp") | ||
bazel_dep(name = "zlib", version = "1.3.1") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
workspace(name = "com_google_verible") | ||
|
||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") | ||
|
||
# | ||
# External tools needed | ||
# | ||
|
||
# 'make install' equivalent rule 2023-02-21 | ||
http_archive( | ||
name = "com_github_google_rules_install", | ||
# The installer uses an option -T that is not available on MacOS, but | ||
# it is benign to leave out. | ||
# Upstream bug https://github.com/google/bazel_rules_install/issues/31 | ||
patch_args = ["-p1"], | ||
patches = ["//bazel:installer.patch"], | ||
sha256 = "aba3c1ae179beb92c1fc4502d66d7d7c648f90eb51897aa4b0ae4a76ce225eec", | ||
strip_prefix = "bazel_rules_install-6001facc1a96bafed0e414a529b11c1819f0cdbe", | ||
urls = ["https://github.com/google/bazel_rules_install/archive/6001facc1a96bafed0e414a529b11c1819f0cdbe.zip"], | ||
) | ||
|
||
load("@com_github_google_rules_install//:deps.bzl", "install_rules_dependencies") | ||
|
||
install_rules_dependencies() | ||
|
||
load("@com_github_google_rules_install//:setup.bzl", "install_rules_setup") | ||
|
||
install_rules_setup() | ||
|
||
# 2024-02-06 | ||
http_archive( | ||
name = "rules_compdb", | ||
sha256 = "70232adda61e89a4192be43b4719d35316ed7159466d0ab4f3da0ecb1fbf00b2", | ||
strip_prefix = "bazel-compilation-database-fa872dd80742b3dccd79a711f52f286cbde33676", | ||
urls = ["https://github.com/grailbio/bazel-compilation-database/archive/fa872dd80742b3dccd79a711f52f286cbde33676.tar.gz"], | ||
) | ||
|
||
load("@rules_compdb//:deps.bzl", "rules_compdb_deps") | ||
|
||
rules_compdb_deps() |
Oops, something went wrong.