Skip to content

Commit

Permalink
chore(bazel): add MODULE.bazel files for bzlmod
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu MOREL <[email protected]>
  • Loading branch information
mmorel-35 committed Mar 13, 2024
1 parent 022a94e commit 3f9dea1
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 1 deletion.
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
45 changes: 45 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
module(
name = "com_google_quiche",
version = "",
)

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)

0 comments on commit 3f9dea1

Please sign in to comment.