Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(bazel): add MODULE.bazel files for bzlmod #66

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Automatically detect host platform to pick config
common --enable_platform_specific_config

common --enable_bzlmod
build --cxxopt=-std=c++17
build --cxxopt=-fno-rtti

Expand Down
46 changes: 46 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
module(
name = "quiche",
version = "0.0.0",
repo_name = "com_google_quiche",
)

bazel_dep(
name = "bazel_skylib",
version = "1.4.1",
)
bazel_dep(
name = "boringssl",
version = "0.0.0-20240126-22d349c",
)
bazel_dep(
name = "googletest",
version = "1.14.0.bcr.1",
repo_name = "com_google_googletest",
)
bazel_dep(
name = "platforms",
version = "0.0.8",
)
bazel_dep(
name = "protobuf",
version = "23.1",
repo_name = "com_google_protobuf",
)
bazel_dep(
name = "rules_cc",
version = "0.0.9",
)
bazel_dep(
name = "zlib",
version = "1.2.13",
)
# -- bazel_dep definitions -- #

non_module_deps = use_extension("//:extensions.bzl", "non_module_deps")
use_repo(
non_module_deps,
"com_google_absl",
"com_google_googleurl",
"com_google_quic_trace",
)
# End of extension `non_module_deps`
Empty file added WORKSPACE.bzlmod
Empty file.
29 changes: 29 additions & 0 deletions extensions.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# -- load statements -- #

def _non_module_deps_impl(ctx):
http_archive(
name = "com_google_absl",
sha256 = "bb5e84fc74362c546ab4193eeafd440a26487f4adf80587d2f2576f03c439c4b", # Last updated 2024-03-06
strip_prefix = "abseil-cpp-53e6dae02bf0d9a5a1d304a3d637c083376b86a1",
urls = ["https://github.com/abseil/abseil-cpp/archive/53e6dae02bf0d9a5a1d304a3d637c083376b86a1.zip"],
)
http_archive(
name = "com_google_googleurl",
urls = [
"https://storage.googleapis.com/quiche-envoy-integration/googleurl_9cdb1f4d1a365ebdbcbf179dadf7f8aa5ee802e7.tar.gz",
],
sha256 = "a1bc96169d34dcc1406ffb750deef3bc8718bd1f9069a2878838e1bd905de989",
)
http_archive(
name = "com_google_quic_trace",
urls = [
"https://github.com/google/quic-trace/archive/c7b993eb750e60c307e82f75763600d9c06a6de1.tar.gz",
],
sha256 = "079331de8c3cbf145a3b57adb3ad4e73d733ecfa84d3486e1c5a9eaeef286549",
strip_prefix = "quic-trace-c7b993eb750e60c307e82f75763600d9c06a6de1",
)

# -- repo definitions -- #

non_module_deps = module_extension(implementation = _non_module_deps_impl)