-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathMODULE.bazel
More file actions
87 lines (76 loc) · 2.96 KB
/
Copy pathMODULE.bazel
File metadata and controls
87 lines (76 loc) · 2.96 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
module(name = "gcc_toolchain")
# Dependencies
# ============
bazel_dep(name = "bazel_skylib", version = "1.8.2")
bazel_dep(name = "bazel_lib", version = "3.3.1")
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "rules_cc", version = "0.2.17")
# Local Toolchains
# ================
gcc_toolchains = use_extension("//toolchain:module_extensions.bzl", "gcc_toolchains", dev_dependency = True)
[
[
gcc_toolchains.toolchain(
name = "gcc_toolchain_{}".format(arch),
target_arch = arch,
),
use_repo(gcc_toolchains, "gcc_toolchain_{}".format(arch)),
register_toolchains(
"@gcc_toolchain_{}//:all".format(arch),
# Register toolchains as dev dependencies so that we don't pollute the toolchain resolution of consumers.
dev_dependency = True,
),
]
# Unfortunately, we can't load `ARCHS` directly here.
# But the attributes in `gcc_toolchains.toolchain` are gated to only contain values from ARCHS.
for arch in [
"aarch64",
"armv7",
"x86_64",
]
]
# An aarch64-HOSTED toolchain, for //tests/host_arch. Deliberately not registered: its
# binaries are ARM, so it cannot execute on an x86_64 CI machine -- the test only inspects
# the fetched archive.
gcc_toolchains.toolchain(
name = "gcc_toolchain_aarch64_host",
gcc_version = "14.3.0",
host_arch = "aarch64",
target_arch = "aarch64",
)
use_repo(gcc_toolchains, "gcc_toolchain_aarch64_host")
# Dev Dependencies (for examples/)
# ===============================
bazel_dep(name = "rules_foreign_cc", version = "0.15.1", dev_dependency = True)
# Pin to a post-0.15.1 commit on main that includes the `-std=gnu90` flag for
# the bundled pkg-config build (PR #1458), required so the bundled glib in
# pkg-config 0.29.2 compiles with GCC 15+ (which defaults to C23).
archive_override(
module_name = "rules_foreign_cc",
integrity = "sha256-bP2ml4bfTFOThLHAAxwTu41mawBCpOq1mEH6emwh/Kk=",
strip_prefix = "rules_foreign_cc-006ae82d9b4953a9b1c170827aef660f9f0f9ec0",
urls = ["https://github.com/bazel-contrib/rules_foreign_cc/archive/006ae82d9b4953a9b1c170827aef660f9f0f9ec0.tar.gz"],
)
bazel_dep(name = "stardoc", version = "0.5.6", dev_dependency = True, repo_name = "io_bazel_stardoc")
# We pin stardoc because a dependency requests a newer version (0.7.2), but the non-workspace flow doesn't work with it.
single_version_override(
module_name = "stardoc",
version = "0.5.6",
)
bazel_dep(name = "protobuf", version = "33.4", dev_dependency = True, repo_name = "com_google_protobuf")
single_version_override(
module_name = "protobuf",
patch_strip = 1,
patches = [
"//third_party/patches:com_google_protobuf.bzlmod.patch",
],
version = "33.4",
)
non_bazel_dependencies = use_extension("//:internal.bzl", "non_bazel_dependencies")
use_repo(
non_bazel_dependencies,
"avl",
"lapack",
"openssl",
)
bazel_dep(name = "rules_shell", version = "0.6.1")