Using Bzlmod with Bazel 6 or greater
- (Bazel 6 only) Enable with
common --enable_bzlmod
in .bazelrc
.
- Add to your
MODULE.bazel
file:
bazel_dep(name = "toolchains_arm_gnu", version = "0.0.1")
# Toolchains: arm-none-eabi
arm_toolchain = use_extension("@toolchains_arm_gnu//:extensions.bzl", "arm_toolchain")
arm_toolchain.arm_none_eabi(version = "13.2.1")
use_repo(
arm_toolchain,
"arm_none_eabi",
"arm_none_eabi_darwin_arm64",
"arm_none_eabi_darwin_x86_64",
"arm_none_eabi_linux_aarch64",
"arm_none_eabi_linux_x86_64",
"arm_none_eabi_windows_x86_64",
)
register_toolchains("@arm_none_eabi//toolchain:all")
# Toolchains: arm-none-linux-gnueabihf
arm_toolchain.arm_none_linux_gnueabihf(version = "13.2.1")
use_repo(
arm_toolchain,
"arm_none_linux_gnueabihf",
"arm_none_linux_gnueabihf_linux_aarch64",
"arm_none_linux_gnueabihf_linux_x86_64",
"arm_none_linux_gnueabihf_windows_x86_64",
)
register_toolchains("@arm_none_linux_gnueabihf//toolchain:all")