Skip to content

Commit

Permalink
feat(compiler): Add gcc version 12 support to the toolchain (#70)
Browse files Browse the repository at this point in the history
* feat(compiler): Add gcc version 12 support to the toolchain

* fix(ci): Fix macos and linux CI by using a supported image

The github action was failing to execute because github no longer
maintains any action runners with the OS versions that were being
requested.

Instead just use the latest, so CI should continue to work and not be
dependent on the end of life of certain OS versions.

Co-authored-by: Nathaniel Brough <[email protected]>
  • Loading branch information
bgianfo and nathaniel-brough authored Sep 26, 2023
1 parent 3c63bfe commit 951e3b4
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ jobs:
- name: Build
run: |
bazelisk build --platforms=@local_config_platform//:host //...
bazelisk build --platforms=@local_config_platform//:host //...
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ gcc_arm_none_repository = repository_rule(
_com_gcc_arm_none_repository_impl,
attrs = {
"version": attr.string(
default = "11",
doc = "GCC version, version 9 and 11 currently only version supported",
default = "12",
doc = "GCC version, version 9, 11, and 12 are currently the only supported versions",
values = TOOLCHAIN_VERSIONS.keys(),
),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,41 @@ _PLATFORM_SPECIFIC_CONFIGS_11 = {
},
}

_WINDOWS_12 = {
"full_version": "12.2.rel1",
"remote_compiler": {
"url": "https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-mingw-w64-i686-arm-none-eabi.zip",
"sha256": "ad1427496cde9bbe7604bc448ec6e115c6538e04af1c8275795ebb1c2b7b2830",
"strip_prefix": "arm-gnu-toolchain-12.2.rel1-mingw-w64-i686-arm-none-eabi",
},
}

_PLATFORM_SPECIFIC_CONFIGS_12 = {
"linux": {
"full_version": "12.2.rel1",
"remote_compiler": {
"url":"https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz",
"sha256": "84be93d0f9e96a15addd490b6e237f588c641c8afdf90e7610a628007fc96867",
"strip_prefix": "arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi",
},
},
"windows": _WINDOWS_12,
"windows server 2019": _WINDOWS_12,
"windows 10": _WINDOWS_12,
"mac os x": {
"full_version": "12.2.rel1",
"remote_compiler": {
"url": "https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-darwin-x86_64-arm-none-eabi.tar.xz",
"sha256": "00c0eeb57ae92332f216151ac66df6ba17d2d3b306dac86f4006006f437b2902",
"strip_prefix": "arm-gnu-toolchain-12.2.rel1-darwin-x86_64-arm-none-eabi",
},
},
}

TOOLCHAIN_VERSIONS = {
"9": _PLATFORM_SPECIFIC_CONFIGS_9,
"11": _PLATFORM_SPECIFIC_CONFIGS_11,
"12": _PLATFORM_SPECIFIC_CONFIGS_12,
}

def get_platform_specific_config(version, os_name):
Expand Down

0 comments on commit 951e3b4

Please sign in to comment.