Skip to content

Commit 325e2a7

Browse files
1 parent 005170d commit 325e2a7

File tree

5 files changed

+74
-1
lines changed

5 files changed

+74
-1
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
"""ARM cross compilation toolchains for bazel"""
2+
3+
module(
4+
name = "toolchains_arm_gnu",
5+
version = "1.0.1",
6+
compatibility_level = 1,
7+
)
8+
9+
bazel_dep(name = "platforms", version = "0.0.8")
10+
bazel_dep(name = "rules_cc", version = "0.0.9")
11+
12+
# DEV ONLY (not needed for release)
13+
bazel_dep(name = "aspect_bazel_lib", version = "2.0.0", dev_dependency = True)
14+
bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True)
15+
16+
arm_toolchain = use_extension(
17+
"@toolchains_arm_gnu//:extensions.bzl",
18+
"arm_toolchain",
19+
dev_dependency = True,
20+
)
21+
arm_toolchain.arm_none_eabi()
22+
use_repo(arm_toolchain, "arm_none_eabi")
23+
arm_toolchain.arm_none_linux_gnueabihf()
24+
use_repo(arm_toolchain, "arm_none_linux_gnueabihf")
25+
arm_toolchain.aarch64_none_elf()
26+
use_repo(arm_toolchain, "aarch64_none_elf")
27+
arm_toolchain.aarch64_none_linux_gnu()
28+
use_repo(arm_toolchain, "aarch64_none_linux_gnu")
29+
30+
register_toolchains(
31+
"//test/toolchains:all",
32+
"@aarch64_none_elf//toolchain:all",
33+
"@aarch64_none_linux_gnu//toolchain:all",
34+
"@arm_none_eabi//toolchain:all",
35+
"@arm_none_linux_gnueabihf//toolchain:all",
36+
dev_dependency = True,
37+
)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
===================================================================
2+
--- a/MODULE.bazel
3+
+++ b/MODULE.bazel
4+
@@ -1,9 +1,9 @@
5+
"""ARM cross compilation toolchains for bazel"""
6+
7+
module(
8+
name = "toolchains_arm_gnu",
9+
- version = "1.0.0",
10+
+ version = "1.0.1",
11+
compatibility_level = 1,
12+
)
13+
14+
bazel_dep(name = "platforms", version = "0.0.8")
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
bcr_test_module:
2+
module_path: "examples/bzlmod"
3+
matrix:
4+
platform: ["debian10", "macos", "ubuntu2004"]
5+
bazel: ["7.x", "6.x"]
6+
tasks:
7+
run_tests:
8+
name: "Run test module"
9+
platform: ${{ platform }}
10+
bazel: ${{ bazel }}
11+
test_targets:
12+
- "//..."
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"integrity": "sha256-2RcHpCfq+plYjFaD7iQMvqq4M37KxA9swXiSN74Zr50=",
3+
"strip_prefix": "bazel-arm-none-eabi-1.0.1",
4+
"url": "https://github.com/hexdae/bazel-arm-none-eabi/releases/download/v1.0.1/bazel-arm-none-eabi-v1.0.1.tar.gz",
5+
"patches": {
6+
"module_dot_bazel_version.patch": "sha256-rqpmt9ENfqFFxbA9d0PjZ6tczAdImR1mpoCrqglIYt8="
7+
},
8+
"patch_strip": 1
9+
}

modules/toolchains_arm_gnu/metadata.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
],
1313
"versions": [
1414
"0.0.1",
15-
"1.0.0"
15+
"1.0.0",
16+
"1.0.1"
1617
],
1718
"yanked_versions": {}
1819
}

0 commit comments

Comments
 (0)