bazelbuild / platforms

Constraint values for specifying platforms and toolchains
Apache License 2.0
108 stars 73 forks source link

[discussion] Deprecate `//cpu:armv8-m` in favor of `//cpu:armv8-m.main` #104

Open armandomontanez opened 3 hours ago

armandomontanez commented 3 hours ago

Similar to #100, I'm looking to tidy up some pre-existing Cortex-M CPU expressions here.

Proposal

Mark //cpu:armv8-m as deprecated, and introduce //cpu:armv8-m.base and //cpu:armv8-m.main.

Why?

ARMv8-M is technically split into two distinctly different ISAs: armv8-m.main and armv8-m.base. The baseline variant of ARMv8-M is more akin to ARMv6-M than ARMv7E-M. Also, when spelling -march, there is no such option for armv8-m. The flavors are either armv8-m.base or armv8-m.main. Note that these flavors are not traditionally considered extensions (unlike FPU or DSP instructions).

Also, this naming carries forward with the armv8.1-m.main architecture, even though it doesn't have a armv8.1-m.base variant.

armandomontanez commented 3 hours ago

Perhaps there's an argument to be made that we should just jump ship entirely on this expression, and use the names available for -mcpu. They're more granular, and better express exactly what you're targeting. You can infer the -march names from -mcpu but not the other way around.