Repository navigation
Expand file tree
/
Copy pathMODULE.bazel
More file actions
88 lines (75 loc) · 3.8 KB
/
Copy pathMODULE.bazel
File metadata and controls
88 lines (75 loc) · 3.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
"""AProxy - multiplatform HTTP/SOCKS5 proxy."""
module(
name = "aproxy",
version = "0.1.0",
)
# --- toolchain -------------------------------------------------------------
bazel_dep(name = "rules_cc", version = "0.2.22")
bazel_dep(name = "platforms", version = "1.1.0")
# Bazel 9 dropped the native sh_test / py_test rules.
bazel_dep(name = "rules_shell", version = "0.8.0")
bazel_dep(name = "rules_python", version = "2.3.2")
# A pinned clang, per the plan. Not registered by default: the host compiler
# builds this project fine and the hermetic toolchain is a large download.
# Opt in with `--config=hermetic`, which is defined in .bazelrc.
bazel_dep(name = "toolchains_llvm", version = "1.9.0")
llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm")
llvm.toolchain(llvm_version = "19.1.0")
use_repo(llvm, "llvm_toolchain")
# --- runtime deps ----------------------------------------------------------
bazel_dep(name = "boost.asio", version = "1.90.0.bcr.1")
bazel_dep(name = "boost.beast", version = "1.90.0.bcr.1")
bazel_dep(name = "boost.json", version = "1.90.0.bcr.1")
bazel_dep(name = "boost.unordered", version = "1.90.0.bcr.1")
bazel_dep(name = "boringssl", version = "0.20260813.0")
# rapidyaml is vendored under third_party/ rather than taken from the registry,
# so the Bazel and CMake builds compile byte-identical parser sources.
# --- test / bench ----------------------------------------------------------
bazel_dep(name = "googletest", version = "1.18.0.bcr.1", dev_dependency = True)
bazel_dep(name = "google_benchmark", version = "1.9.5", dev_dependency = True)
bazel_dep(name = "fuzztest", version = "20260629.0", dev_dependency = True)
# fuzztest transitively pulls in a chain of modules (Centipede's Go and JS
# tooling, then riegeli and brotli under that) whose Bazel Central Registry
# versions predate Bazel 9's native-rule removals; overriding each one to a
# version that's been updated for it is what makes toolchain resolution for
# *any* cc_test succeed, not just fuzz_test's.
bazel_dep(name = "rules_go", version = "0.63.0", dev_dependency = True)
bazel_dep(name = "aspect_rules_esbuild", version = "0.27.0", dev_dependency = True)
bazel_dep(name = "riegeli", version = "0.0.0-20250822-9f2744d", dev_dependency = True)
bazel_dep(name = "brotli", version = "1.2.0.bcr.3", dev_dependency = True)
bazel_dep(name = "snappy", version = "1.2.2.bcr.3", dev_dependency = True)
# highwayhash (under riegeli) has no BCR release newer than its native
# cc_library usage; there's nothing to bump to, so patch the one line in.
single_version_override(
module_name = "highwayhash",
version = "0.0.0-20240305-5ad3bf8.bcr.1",
patch_cmds = [
"printf 'load(\"@rules_cc//cc:defs.bzl\", \"cc_library\")\\n\\n' | cat - BUILD.bazel > BUILD.bazel.tmp && mv BUILD.bazel.tmp BUILD.bazel",
],
)
# Perfetto has no Bazel Central Registry module, so its amalgamated SDK is
# fetched directly. Bazel resolves repositories lazily, so nothing is
# downloaded unless a target actually selects it (--config=trace).
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "perfetto_sdk",
build_file_content = """
load("@rules_cc//cc:defs.bzl", "cc_library")
cc_library(
name = "perfetto",
srcs = ["perfetto.cc"],
hdrs = ["perfetto.h"],
copts = ["-w"],
includes = ["."],
linkopts = select({
# Bazel's default toolchains already link pthread elsewhere; only older
# Linux needs it named explicitly.
"@platforms//os:linux": ["-lpthread"],
"//conditions:default": [],
}),
visibility = ["//visibility:public"],
)
""",
sha256 = "e56126ff81f0f914d35fe03c72419d147acf2890f36fbda7d4558fd5b84c4b09",
urls = ["https://github.com/google/perfetto/releases/download/v58.2/perfetto-cpp-sdk-src.zip"],
)