From b04f8d3adc6f5b06b26e150ee7134cd257e38530 Mon Sep 17 00:00:00 2001 From: Tony Aiuto Date: Tue, 8 Nov 2022 23:33:58 -0500 Subject: [PATCH 1/3] add cortex cpus --- cpu/BUILD | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cpu/BUILD b/cpu/BUILD index 4d4ffd3..85df4b9 100644 --- a/cpu/BUILD +++ b/cpu/BUILD @@ -59,6 +59,7 @@ constraint_value( constraint_value( name = "armv8-r", constraint_setting = ":cpu", + deprecation = "Do not use. Use a specific cpu product", ) constraint_value( @@ -86,6 +87,16 @@ constraint_value( constraint_setting = ":cpu", ) +constraint_value( + name = "cortex-r52", + constraint_setting = ":cpu", +) + +constraint_value( + name = "cortex-r82", + constraint_setting = ":cpu", +) + constraint_value( name = "i386", constraint_setting = ":cpu", From 0f056b51eeae683a144b2d1fc64a10819212172d Mon Sep 17 00:00:00 2001 From: Tony Aiuto Date: Tue, 8 Nov 2022 23:48:32 -0500 Subject: [PATCH 2/3] comments --- cpu/BUILD | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/cpu/BUILD b/cpu/BUILD index 85df4b9..b01dbd0 100644 --- a/cpu/BUILD +++ b/cpu/BUILD @@ -13,6 +13,24 @@ filegroup( # To add a new constraint_value see https://github.com/bazelbuild/platforms. constraint_setting(name = "cpu") +# New cpu values should refer to specific, highly available CPU implementations, +# not broad architectures. It should be possible to select the right compiler +# options by just by knowing the cpu. This can be a difficult evaluation for +# ARM variations, where there are many possibilities for customization within +# an architecture. +# +# 1. No private names are be allowed. If you build your own custom ARM chips, +# then define them locally within your organization. +# 2. All CPU values must be clear that they are for a 32 or a 64 bit +# implementation. For example, cortex-r52 is a 32 bit processor, and +# cortex-r82 is a 64 bit processor, but both are armv8-r architecture. +# We use the specific processor names because armv8-r is insufficient to +# select proper compiler options. +# +# 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", From de09b0defcfa7520fd2a634f29c5055d86945c5b Mon Sep 17 00:00:00 2001 From: Tony Aiuto Date: Wed, 9 Nov 2022 14:14:34 -0500 Subject: [PATCH 3/3] remove armv8-r --- cpu/BUILD | 7 ------- 1 file changed, 7 deletions(-) diff --git a/cpu/BUILD b/cpu/BUILD index b01dbd0..50e462b 100644 --- a/cpu/BUILD +++ b/cpu/BUILD @@ -73,13 +73,6 @@ constraint_value( constraint_setting = ":cpu", ) -# Cortex-R52 -constraint_value( - name = "armv8-r", - constraint_setting = ":cpu", - deprecation = "Do not use. Use a specific cpu product", -) - constraint_value( name = "arm64_32", constraint_setting = ":cpu",