Skip to content

GCC toolchain declaration shouldn't use global platforms #51

@vedranMv

Description

@vedranMv

Hi,

I think I bumped into an issue regarding toolchain - platform compatibility. Namely, in toolchains/gcc_arm_none_eabi/gcc_arm_none_toolchain.bzl there's defined a list of allowed architectures which, among other options, contains armv8-m.base that I'm currently using in my project.

This option is not available in bazel's platforms so once toolchain resolution comes to "@platforms//cpu:" + architecture, it breaks.

An alternative would probably be to use "//constraints/cpu:" + architecture, so that it uses CPUs defined in workspace which can then be used both when declaring platforms, and devices (used by toolchains).

My setup works with that approach, but I'm not sure if it could have undesired consequences elsewhere. What do you think about that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions