Skip to content

Commit

Permalink
[AARCH64] update release (#50)
Browse files Browse the repository at this point in the history
* [AARCH64] update release

* [BUILDIFIER] format
  • Loading branch information
hexdae authored Apr 23, 2024
1 parent 3061c51 commit 7c7e899
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 14 deletions.
14 changes: 13 additions & 1 deletion .github/tools/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ SHA=$(shasum -a 256 $ARCHIVE | awk '{print $1}')
cat << EOF
## MODULE.bazel
Feel free to pick only the toolchains you need. Default toolchains are provided
with `register_toolchains(@<arm_toolchain>//toolchain:all)` but registering them
is optional (especially when using custom toolchains)
\`\`\`starlark
bazel_dep(name = "toolchains_arm_gnu", version = "${TAG:1}")
Expand All @@ -34,9 +38,12 @@ register_toolchains("@arm_none_linux_gnueabihf//toolchain:all")
arm_toolchain.aarch64_none_elf()
use_repo(arm_toolchain, "aarch64_none_elf")
register_toolchains("@aarch64_none_elf//toolchain:all")
arm_toolchain.aarch64_none_linux_gnu()
use_repo(arm_toolchain, "aarch64_none_linux_gnu")
register_toolchains("@aarch64_none_linux_gnu//toolchain:all")
\`\`\`
Feel free to pick only the toolchains you need
## WORKSPACE
Expand Down Expand Up @@ -73,6 +80,11 @@ register_toolchains("@arm_none_linux_gnueabihf//toolchain:all")
load("@toolchains_arm_gnu//:deps.bzl", "aarch64_none_elf_deps")
aarch64_none_elf_deps()
register_toolchains("@aarch64_none_elf//toolchain:all")
# Toolchain aarch64-none-linux-gnu
load("@toolchains_arm_gnu//:deps.bzl", "aarch64_none_linux_gnu_deps")
aarch64_none_linux_gnu_deps()
register_toolchains("@aarch64_none_linux_gnu//toolchain:all")
\`\`\`
</details>
Expand Down
2 changes: 1 addition & 1 deletion MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ register_toolchains("@arm_none_linux_gnueabihf//toolchain:all")
arm_toolchain.aarch64_none_elf()
use_repo(arm_toolchain, "aarch64_none_elf")
register_toolchains("@aarch64_none_elf//toolchain:all")

arm_toolchain.aarch64_none_linux_gnu()
use_repo(arm_toolchain, "aarch64_none_linux_gnu")
register_toolchains("@aarch64_none_linux_gnu//toolchain:all")
```

## WORKSPACE
Expand Down Expand Up @@ -113,6 +117,10 @@ register_toolchains("@arm_none_linux_gnueabihf//toolchain:all")
load("@toolchains_arm_gnu//:deps.bzl", "aarch64_none_elf_deps")
aarch64_none_elf_deps()
register_toolchains("@aarch64_none_elf//toolchain:all")

load("@toolchains_arm_gnu//:deps.bzl", "aarch64_none_linux_gnu_deps")
aarch64_none_linux_gnu_deps()
register_toolchains("@aarch64_none_linux_gnu//toolchain:all")
```

</details>
Expand Down
5 changes: 0 additions & 5 deletions examples/bzlmod/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,15 @@ module(
bazel_dep(name = "aspect_bazel_lib", version = "2.0.0")
bazel_dep(name = "bazel_skylib", version = "1.5.0")
bazel_dep(name = "toolchains_arm_gnu")

local_path_override(
module_name = "toolchains_arm_gnu",
path = "../..",
)

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_toolchain.arm_none_linux_gnueabihf(version = "13.2.1")

use_repo(arm_toolchain, "arm_none_linux_gnueabihf")

register_toolchains(
Expand Down
2 changes: 1 addition & 1 deletion examples/bzlmod/custom/BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# project/BUILD.bazel

load("@rules_cc//cc:defs.bzl", "cc_binary")
load("@aspect_bazel_lib//lib:transitions.bzl", "platform_transition_filegroup")
load("@rules_cc//cc:defs.bzl", "cc_binary")

cc_binary(
name = "binary",
Expand Down
3 changes: 0 additions & 3 deletions examples/gcc_version/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@ module(
bazel_dep(name = "aspect_bazel_lib", version = "2.0.0")
bazel_dep(name = "bazel_skylib", version = "1.5.0")
bazel_dep(name = "toolchains_arm_gnu")

local_path_override(
module_name = "toolchains_arm_gnu",
path = "../..",
)

arm_toolchain = use_extension("@toolchains_arm_gnu//:extensions.bzl", "arm_toolchain")

arm_toolchain.arm_none_eabi(version = "9.2.1")

use_repo(arm_toolchain, "arm_none_eabi")

register_toolchains("@arm_none_eabi//toolchain:all")
2 changes: 1 addition & 1 deletion examples/raspberry_pi/platform/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ platform(
"//cpu:a76",
],
visibility = ["//visibility:public"],
)
)
4 changes: 3 additions & 1 deletion examples/raspberry_pi/toolchain/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ aarch64_none_elf_toolchain(
"-Wall",
"-O2",
"-ffreestanding",
"-nostdinc", "-nostdlib", "-nostartfiles"
"-nostdinc",
"-nostdlib",
"-nostartfiles",
],
linkopts = [
"-mcpu=cortex-a53",
Expand Down
6 changes: 5 additions & 1 deletion examples/workspace/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ local_repository(
path = "../../",
)

load("@toolchains_arm_gnu//:deps.bzl", "aarch64_none_elf_deps", "arm_none_eabi_deps", "arm_none_linux_gnueabihf_deps")
load("@toolchains_arm_gnu//:deps.bzl", "aarch64_none_elf_deps", "aarch64_none_linux_gnu_deps", "arm_none_eabi_deps", "arm_none_linux_gnueabihf_deps")

# Toolchain: arm-none-eabi
arm_none_eabi_deps()
Expand All @@ -40,5 +40,9 @@ aarch64_none_elf_deps()

register_toolchains("@aarch64_none_elf//toolchain:all")

aarch64_none_linux_gnu_deps()

register_toolchains("@aarch64_none_linux_gnu//toolchain:all")

# Custom toolchain
register_toolchains("//custom/toolchain:all")

0 comments on commit 7c7e899

Please sign in to comment.