Add :aarch32 :aarch64 and make :arm64 alias for :aarch64

"aarch64" is the perferred name and used prevailingly on Linux.
See https://nickdesaulniers.github.io/blog/2023/03/10/disambiguating-arm/

Apple and Windows platforms unfortunately use "arm64". They can still
use the alias.

While here, add :aarch32 as well.

Close #68
This commit is contained in:
Fangrui Song 2023-05-08 18:15:04 +00:00
parent 1207091988
commit 2532b8708e
1 changed files with 13 additions and 11 deletions

View File

@ -30,19 +30,21 @@ constraint_setting(name = "cpu")
# Many of the name here are legacy values and probably violate these conditions.
# We'll try to clean those up over time.
# TODO(b/136237408): Remove this generic CPU name and replace with a specific one.
alias(
name = "aarch64",
actual = ":arm64",
constraint_value(
name = "aarch32",
constraint_setting = ":cpu",
)
# TODO(b/136237408): Remove this generic CPU name and replace with a specific one.
constraint_value(
name = "arm",
name = "aarch64",
constraint_setting = ":cpu",
)
alias(
name = "arm",
actual = ":aarch32",
)
# Cortex-M0, Cortex-M0+, Cortex-M1
constraint_value(
name = "armv6-m", # Commonly known as thumbv6
@ -73,13 +75,13 @@ constraint_value(
constraint_setting = ":cpu",
)
constraint_value(
name = "arm64_32",
constraint_setting = ":cpu",
alias(
name = "arm64",
actual = ":aarch64",
)
constraint_value(
name = "arm64",
name = "arm64_32",
constraint_setting = ":cpu",
)