Skip to content

Commit

Permalink
chore: incompatible_use_platforms_repo_for_constraints (#2536)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle authored Mar 16, 2021
1 parent 1fd9754 commit 09be982
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 30 deletions.
2 changes: 2 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,5 @@ build:docker-sandbox --experimental_docker_image=gcr.io/cloud-marketplace/google
# Incompatible flags to run with
build --incompatible_no_implicit_file_export
build --incompatible_restrict_string_escapes
# TODO(alexeagle): turn on this flag when dependencies allow
# build --incompatible_use_platforms_repo_for_constraints
20 changes: 10 additions & 10 deletions packages/concatjs/devserver/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -74,40 +74,40 @@ filegroup(
config_setting(
name = "darwin_x64",
constraint_values = [
"@bazel_tools//platforms:osx",
"@bazel_tools//platforms:x86_64",
"@platforms//os:osx",
"@platforms//cpu:x86_64",
],
)

config_setting(
name = "linux_x64",
constraint_values = [
"@bazel_tools//platforms:linux",
"@bazel_tools//platforms:x86_64",
"@platforms//os:linux",
"@platforms//cpu:x86_64",
],
)

config_setting(
name = "linux_arm64",
constraint_values = [
"@bazel_tools//platforms:linux",
"@bazel_tools//platforms:aarch64",
"@platforms//os:linux",
"@platforms//cpu:aarch64",
],
)

config_setting(
name = "linux_s390x",
constraint_values = [
"@bazel_tools//platforms:linux",
"@bazel_tools//platforms:s390x",
"@platforms//os:linux",
"@platforms//cpu:s390x",
],
)

config_setting(
name = "windows_x64",
constraint_values = [
"@bazel_tools//platforms:windows",
"@bazel_tools//platforms:x86_64",
"@platforms//os:windows",
"@platforms//cpu:x86_64",
],
)

Expand Down
40 changes: 20 additions & 20 deletions toolchains/node/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -20,40 +20,40 @@ licenses(["notice"]) # Apache 2.0
platform(
name = "darwin_amd64",
constraint_values = [
"@bazel_tools//platforms:osx",
"@bazel_tools//platforms:x86_64",
"@platforms//os:osx",
"@platforms//cpu:x86_64",
],
)

platform(
name = "linux_amd64",
constraint_values = [
"@bazel_tools//platforms:linux",
"@bazel_tools//platforms:x86_64",
"@platforms//os:linux",
"@platforms//cpu:x86_64",
],
)

platform(
name = "linux_arm64",
constraint_values = [
"@bazel_tools//platforms:linux",
"@bazel_tools//platforms:aarch64",
"@platforms//os:linux",
"@platforms//cpu:aarch64",
],
)

platform(
name = "windows_amd64",
constraint_values = [
"@bazel_tools//platforms:windows",
"@bazel_tools//platforms:x86_64",
"@platforms//os:windows",
"@platforms//cpu:x86_64",
],
)

platform(
name = "linux_s390x",
constraint_values = [
"@bazel_tools//platforms:linux",
"@bazel_tools//platforms:s390x",
"@platforms//os:linux",
"@platforms//cpu:s390x",
],
)

Expand Down Expand Up @@ -104,8 +104,8 @@ alias(
toolchain(
name = "node_linux_amd64_toolchain",
target_compatible_with = [
"@bazel_tools//platforms:linux",
"@bazel_tools//platforms:x86_64",
"@platforms//os:linux",
"@platforms//cpu:x86_64",
],
toolchain = "@nodejs_linux_amd64_config//:toolchain",
toolchain_type = ":toolchain_type",
Expand All @@ -114,8 +114,8 @@ toolchain(
toolchain(
name = "node_linux_arm64_toolchain",
target_compatible_with = [
"@bazel_tools//platforms:linux",
"@bazel_tools//platforms:aarch64",
"@platforms//os:linux",
"@platforms//cpu:aarch64",
],
toolchain = "@nodejs_linux_arm64_config//:toolchain",
toolchain_type = ":toolchain_type",
Expand All @@ -124,8 +124,8 @@ toolchain(
toolchain(
name = "node_darwin_amd64_toolchain",
target_compatible_with = [
"@bazel_tools//platforms:osx",
"@bazel_tools//platforms:x86_64",
"@platforms//os:osx",
"@platforms//cpu:x86_64",
],
toolchain = "@nodejs_darwin_amd64_config//:toolchain",
toolchain_type = ":toolchain_type",
Expand All @@ -134,8 +134,8 @@ toolchain(
toolchain(
name = "node_windows_amd64_toolchain",
target_compatible_with = [
"@bazel_tools//platforms:windows",
"@bazel_tools//platforms:x86_64",
"@platforms//os:windows",
"@platforms//cpu:x86_64",
],
toolchain = "@nodejs_windows_amd64_config//:toolchain",
toolchain_type = ":toolchain_type",
Expand All @@ -144,8 +144,8 @@ toolchain(
toolchain(
name = "node_linux_s390x_toolchain",
target_compatible_with = [
"@bazel_tools//platforms:linux",
"@bazel_tools//platforms:s390x",
"@platforms//os:linux",
"@platforms//cpu:s390x",
],
toolchain = "@nodejs_linux_s390x_config//:toolchain",
toolchain_type = ":toolchain_type",
Expand Down

0 comments on commit 09be982

Please sign in to comment.