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 aa203bd
Show file tree
Hide file tree
Showing 4 changed files with 66 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
42 changes: 42 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
module(
name = "com_google_quiche",
version = "",
)

bazel_dep(
name = "abseil-cpp",
version = "20240116.1",
repo_name = "com_google_absl",
)
bazel_dep(
name = "bazel_skylib",
version = "1.2.1",
)
bazel_dep(
name = "boringssl",
version = "0.0.0-20240126-22d349c",
)
bazel_dep(
name = "googletest",
version = "1.11.0",
repo_name = "com_google_googletest",
)
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.12",
)
# -- bazel_dep definitions -- #

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

def _non_module_deps_impl(ctx):
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 aa203bd

Please sign in to comment.