-
Notifications
You must be signed in to change notification settings - Fork 206
Expand file tree
/
Copy pathMODULE.bazel
More file actions
138 lines (129 loc) · 6.42 KB
/
MODULE.bazel
File metadata and controls
138 lines (129 loc) · 6.42 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
###############################################################################
# Bazel now uses Bzlmod by default to manage external dependencies.
# Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel.
#
# For more details, please check https://github.com/bazelbuild/bazel/issues/18958
###############################################################################
bazel_dep(name = "abseil-cpp", version = "20260107.0")
bazel_dep(name = "aspect_bazel_lib", version = "2.19.3")
bazel_dep(name = "aspect_rules_lint", version = "1.4.4", dev_dependency = True)
bazel_dep(name = "bazel_skylib", version = "1.8.2", dev_dependency = True)
bazel_dep(name = "boringssl", version = "0.20241024.0")
bazel_dep(name = "rules_perl", version = "0.2.4")
bazel_dep(name = "brotli")
bazel_dep(name = "crc32c")
bazel_dep(name = "curl")
bazel_dep(name = "cxx.rs", version = "1.0.194")
bazel_dep(name = "fmt", version = "11.2.0.bcr.1")
bazel_dep(name = "freetype", version = "2.13.3.bcr.2")
bazel_dep(name = "gflags")
bazel_dep(name = "googleapis", version = "0.0.0-20241220-5e258e33.bcr.1")
bazel_dep(name = "googleapis-cc", version = "1.0.0")
bazel_dep(name = "googletest")
bazel_dep(name = "grpc")
bazel_dep(name = "grpc-proto")
bazel_dep(name = "hedron_compile_commands", dev_dependency = True)
bazel_dep(name = "icu", version = "76.1.bcr.1")
bazel_dep(name = "jsoncpp")
bazel_dep(name = "libarchive", version = "3.7.9")
bazel_dep(name = "libevent", version = "2.1.12-stable.bcr.0")
bazel_dep(name = "libjpeg_turbo")
bazel_dep(name = "libpng", version = "1.6.47.bcr.1")
bazel_dep(name = "libuuid")
bazel_dep(name = "libxml2", version = "2.13.5")
bazel_dep(name = "libzip", version = "1.10.1")
bazel_dep(name = "lz4", version = "1.9.4.bcr.2")
bazel_dep(name = "nasm", version = "2.16.03.bcr.1")
bazel_dep(name = "pcre2", version = "10.45")
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "protobuf", version = "31.1")
bazel_dep(name = "rootcanal")
bazel_dep(name = "rules_cc", version = "0.2.16")
bazel_dep(name = "rules_flex", version = "0.4")
# this is normally an indirect dependency, but for bazel 9 we need a higher version
bazel_dep(name = "rules_foreign_cc", version = "0.15.1")
bazel_dep(name = "rules_java", version = "7.12.2")
bazel_dep(name = "rules_license", version = "1.0.0")
# this is normally an indirect dependency, but for bazel 9 we need a higher version
bazel_dep(name = "rules_nodejs", version = "6.7.3")
bazel_dep(name = "rules_proto", version = "7.1.0")
bazel_dep(name = "rules_proto_grpc_cpp", version = "5.0.1")
bazel_dep(name = "rules_proto_grpc_go", version = "5.3.0")
bazel_dep(name = "rules_python", version = "1.7.0")
bazel_dep(name = "rules_rust", version = "0.68.1")
bazel_dep(name = "rules_shell", version = "0.6.1")
bazel_dep(name = "tinyxml2", version = "10.0.0")
bazel_dep(name = "toolchains_llvm", version = "1.6.0")
bazel_dep(name = "sandboxed_api")
bazel_dep(name = "zlib", version = "1.3.1.bcr.7")
include("//build_external:build_external.MODULE.bazel")
include("//cuttlefish/host/commands/append_squashfs_overlay:append_squashfs_overlay.MODULE.bazel")
include("//cuttlefish/host/commands/vhost_user_input:vhost_user_input.MODULE.bazel")
include("//cuttlefish/host/commands/vhost_user_media:vhost_user_media.MODULE.bazel")
include("//toolchain:bazel.MODULE.bazel")
include("//toolchain:llvm.MODULE.bazel")
include("//toolchain:python.MODULE.bazel")
include("//toolchain:rust.MODULE.bazel")
# riscv64: rules_rust does not support riscv64 host out of the box.
# Patch triple.bzl to add riscv64gc to the supported linux architectures
# and map the riscv64 arch string to riscv64gc (Rust's triple prefix).
# Also patch crate_universe to include riscv64gc-unknown-linux-gnu in the
# default SUPPORTED_PLATFORM_TRIPLES so generated BUILD files are compatible.
single_version_override(
module_name = "rules_rust",
patches = [
"//patches/rules_rust:riscv64_triple.patch",
"//patches/rules_rust:riscv64_supported_platform.patch",
],
patch_strip = 1,
)
# riscv64: toolchains_llvm does not support riscv64 as a host architecture.
# Patch to add linux-riscv64 to SUPPORTED_TARGETS and its target system name.
single_version_override(
module_name = "toolchains_llvm",
patches = [
"//patches/toolchains_llvm:riscv64_common.patch",
"//patches/toolchains_llvm:riscv64_configure.patch",
"//patches/toolchains_llvm:riscv64_cc_toolchain_config.patch",
# Fix: system_module_map filtering needs to strip %workspace% prefix,
# so non-existing include dirs (lib64/, arch-specific c++/v1) are
# filtered out when using toolchain_root with an absolute path.
# This is a generic bug affecting any toolchain_root usage.
"//patches/toolchains_llvm:system_modulemap_filter.patch",
],
patch_strip = 1,
)
# riscv64: aspect_bazel_lib's expand_template toolchain has no prebuilt
# binary for riscv64. Patch to add linux_riscv64 support using a locally
# built binary at /usr/local/bin/expand_template.
# Build it from the aspect_bazel_lib source with:
# go build -o /usr/local/bin/expand_template .
single_version_override(
module_name = "aspect_bazel_lib",
patches = ["//patches/aspect_bazel_lib:riscv64_expand_template.patch"],
patch_strip = 1,
)
# riscv64: rules_perl 0.2.4 has no riscv64 perl toolchain and its MODULE.bazel
# cannot be patched via single_version_override. Instead, download the prebuilt
# perl tarball ourselves and register a local toolchain definition.
perl_riscv64 = use_repo_rule("@rules_perl//perl:repo.bzl", "perl_download")
perl_riscv64(
name = "perl_linux_riscv64",
urls = ["https://github.com/monkey-jsun/relocatable-perl-riscv/releases/download/5.42.2.0-riscv64/perl-linux-riscv64.tar.xz"],
sha256 = "23049b4574d76e35ec774160f6231ddae6127d1918de800c9d11eb25636e7351",
strip_prefix = "perl-linux-riscv64",
)
register_toolchains("//toolchain:perl_linux_riscv64_toolchain")
# riscv64: openssl 3.3.1.bcr.1 overlay does not include riscv64 constants.
# Use a patched overlay tarball that adds constants-linux-riscv64.bzl.
# Also patch BUILD.bazel to add riscv64 to all select() blocks.
# Source: https://github.com/monkey-jsun/android-cuttlefish/releases/tag/prebuilt-riscv64-assests
single_version_override(
module_name = "openssl",
patches = [
"//patches/openssl:riscv64_overlay.patch",
"//patches/openssl:openssl_riscv64_build.patch",
"//patches/openssl:openssl_riscv64_def_hdrs.patch",
],
patch_strip = 1,
)