-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add default constraint_settings and values in new package @bazel_tool…
…s//platforms. Part of #2219. -- Change-Id: I312c70e0c9064cbf4c4346a59bff04ada92e4890 Reviewed-on: https://cr.bazel.build/9412 PiperOrigin-RevId: 151016060 MOS_MIGRATED_REVID=151016060
- Loading branch information
1 parent
cc07b2d
commit 58a8f07
Showing
4 changed files
with
74 additions
and
0 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package( | ||
default_visibility = ["//visibility:public"], | ||
) | ||
|
||
filegroup( | ||
name = "package-srcs", | ||
srcs = [ | ||
"platforms.BUILD", | ||
], | ||
) | ||
|
||
filegroup( | ||
name = "srcs", | ||
srcs = glob(["**"]), | ||
) |
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,56 @@ | ||
# Standard constraint_setting and constraint_values to be used in platforms. | ||
|
||
package( | ||
default_visibility = ["//visibility:public"], | ||
) | ||
|
||
# These match values in //src/main/java/com/google/build/lib/util:CPU.java | ||
constraint_setting(name = "cpu") | ||
|
||
constraint_value( | ||
name = "x86_32", | ||
constraint_setting = ":cpu", | ||
) | ||
|
||
constraint_value( | ||
name = "x86_64", | ||
constraint_setting = ":cpu", | ||
) | ||
|
||
constraint_value( | ||
name = "ppc", | ||
constraint_setting = ":cpu", | ||
) | ||
|
||
constraint_value( | ||
name = "arm", | ||
constraint_setting = ":cpu", | ||
) | ||
|
||
constraint_value( | ||
name = "x390x", | ||
constraint_setting = ":cpu", | ||
) | ||
|
||
# These match values in //src/main/java/com/google/build/lib/util:OS.java | ||
constraint_setting(name = "os") | ||
|
||
constraint_value( | ||
name = "osx", | ||
constraint_setting = ":os", | ||
) | ||
|
||
constraint_value( | ||
name = "freebsd", | ||
constraint_setting = ":os", | ||
) | ||
|
||
constraint_value( | ||
name = "linux", | ||
constraint_setting = ":os", | ||
) | ||
|
||
constraint_value( | ||
name = "windows", | ||
constraint_setting = ":os", | ||
) |