-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pw_toolchain_bazel: Move CPU constraints
pw_toolchain_bazel has been migrated to rules_cc, so the implementation in Pigweed is being removed. This moves Pigweed's ARM mcpu constraints into the main Pigweed repository so pw_toolchain_bazel can be removed. Bug: b/346388161 Change-Id: Ic85f8502671d8388fd8f01c0d3567f2433a9a8bc Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/252314 Docs-Not-Needed: Armando Montanez <[email protected]> Commit-Queue: Auto-Submit <[email protected]> Reviewed-by: Ted Pudlik <[email protected]> Lint: Lint 🤖 <[email protected]> Pigweed-Auto-Submit: Armando Montanez <[email protected]> Presubmit-Verified: CQ Bot Account <[email protected]>
- Loading branch information
1 parent
f909776
commit 4f14d74
Showing
13 changed files
with
179 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# Copyright 2024 The Pigweed Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
# use this file except in compliance with the License. You may obtain a copy of | ||
# the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing permissions and limitations under | ||
# the License. | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
licenses(["notice"]) | ||
|
||
# The target Arm processor. | ||
# | ||
# The values of this constraint_setting correspond to valid values of the -mcpu | ||
# compiler flag. See | ||
# https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html#index-mcpu-2. These | ||
# values are intended to be used in `target_compatible_with` attributes of | ||
# toolchains which specify the corresponding value of -mcpu. | ||
# | ||
# The constraint_values are not currently exhaustively enumerated (only a few | ||
# of the legal -mcpu values have corresponding constraint_values). The intent | ||
# is for additional values to be added when needed. | ||
# | ||
# The intent is to support only the base processor type, not -march | ||
# values (e.g., armv7e-m). This is because it is recommended to use (processor | ||
# type + optional architectural extensions) when configuring Arm GCC (see | ||
# https://community.arm.com/arm-community-blogs/b/tools-software-ides-blog/posts/compiler-flags-across-architectures-march-mtune-and-mcpu). | ||
# In addition, the march values can already be captured using @platforms//cpu. | ||
# | ||
# Additionally, extensions should be represented via separate constraints to | ||
# prevent the explosion of many variants. | ||
constraint_setting( | ||
name = "mcpu", | ||
default_constraint_value = "none", | ||
) | ||
|
||
constraint_value( | ||
name = "none", | ||
constraint_setting = ":mcpu", | ||
) | ||
|
||
constraint_value( | ||
name = "cortex-a32", | ||
constraint_setting = ":mcpu", | ||
) | ||
|
||
constraint_value( | ||
name = "cortex-m0", | ||
constraint_setting = ":mcpu", | ||
) | ||
|
||
constraint_value( | ||
name = "cortex-m0plus", | ||
constraint_setting = ":mcpu", | ||
) | ||
|
||
constraint_value( | ||
name = "cortex-m3", | ||
constraint_setting = ":mcpu", | ||
) | ||
|
||
constraint_value( | ||
name = "cortex-m4", | ||
constraint_setting = ":mcpu", | ||
) | ||
|
||
constraint_value( | ||
name = "cortex-m4+nofp", | ||
constraint_setting = ":mcpu", | ||
deprecation = "FPU properties should be expressed with different constraints", | ||
) | ||
|
||
constraint_value( | ||
name = "cortex-m7", | ||
constraint_setting = ":mcpu", | ||
) | ||
|
||
constraint_value( | ||
name = "cortex-m33", | ||
constraint_setting = ":mcpu", | ||
) | ||
|
||
constraint_value( | ||
name = "cortex-m33+nofp", | ||
constraint_setting = ":mcpu", | ||
deprecation = "FPU properties should be expressed with different constraints", | ||
) |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.