Skip to content

Commit

Permalink
chore(bazel): add MODULE.bazel files for bzlmod (DataDog#102)
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu MOREL <[email protected]>
  • Loading branch information
mmorel-35 authored Mar 13, 2024
1 parent e9aa08a commit 80bd66e
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/bazel-*
/.build/
/.coverage/
MODULE.bazel.lock
20 changes: 20 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module(
name = "dd-trace-cpp",
version = "",
)

bazel_dep(
name = "bazel_skylib",
version = "1.2.1",
)
bazel_dep(
name = "rules_cc",
version = "0.0.9",
)
# -- bazel_dep definitions -- #

non_module_dependencies = use_extension("//:extensions.bzl", "non_module_dependencies")
use_repo(
non_module_dependencies,
"com_google_absl",
)
Empty file added WORKSPACE.bzlmod
Empty file.
15 changes: 15 additions & 0 deletions extensions.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

def _non_module_dependencies_impl(_ctx):
http_archive(
name = "com_google_absl",
patch_args = ["-p1"],
patches = ["//:abseil.patch"],
sha256 = "aabf6c57e3834f8dc3873a927f37eaf69975d4b28117fc7427dfb1c661542a87",
strip_prefix = "abseil-cpp-98eb410c93ad059f9bba1bf43f5bb916fc92a5ea",
urls = ["https://github.com/abseil/abseil-cpp/archive/98eb410c93ad059f9bba1bf43f5bb916fc92a5ea.zip"],
)

non_module_dependencies = module_extension(
implementation = _non_module_dependencies_impl,
)

0 comments on commit 80bd66e

Please sign in to comment.