Skip to content

Commit

Permalink
Add default constraint_settings and values in new package @bazel_tool…
Browse files Browse the repository at this point in the history
…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
katre authored and hermione521 committed Mar 23, 2017
1 parent cc07b2d commit 58a8f07
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/create_embedded_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ for i in $*; do

case "$i" in
*tools/jdk/BUILD*) OUTPUT_PATH=tools/jdk/BUILD ;;
*tools/platforms/platforms.BUILD) OUTPUT_PATH=platforms/BUILD ;;
*JavaBuilder*_deploy.jar) OUTPUT_PATH=tools/jdk/JavaBuilder_deploy.jar ;;
*JacocoCoverage*_deploy.jar) OUTPUT_PATH=tools/jdk/JacocoCoverage_deploy.jar ;;
*turbine_deploy.jar) OUTPUT_PATH=tools/jdk/turbine_deploy.jar ;;
Expand Down
2 changes: 2 additions & 0 deletions tools/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ filegroup(
"//tools/coverage:srcs",
"//tools/ide:srcs",
"//tools/jdk:srcs",
"//tools/platforms:srcs",
"//tools/genrule:srcs",
"//tools/cpp:srcs",
"//tools/j2objc:srcs",
Expand Down Expand Up @@ -49,6 +50,7 @@ filegroup(
"//tools/j2objc:srcs",
"//tools/jdk:package-srcs",
"//tools/jdk:srcs",
"//tools/platforms:package-srcs",
"//tools/objc:srcs",
"//tools/python:srcs",
"//tools/test:srcs",
Expand Down
15 changes: 15 additions & 0 deletions tools/platforms/BUILD
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(["**"]),
)
56 changes: 56 additions & 0 deletions tools/platforms/platforms.BUILD
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",
)

0 comments on commit 58a8f07

Please sign in to comment.