Skip to content

Commit

Permalink
Fix select with conditons on darwin.
Browse files Browse the repository at this point in the history
Bazel is changing how @bazel_tools/conditions:darwin is implemented.
With old implementation based on flags, it was ok to have darwin and
darwin_x86_64 in a select. This was based on flag --cpu=darwin and
--cpu=dawin_x86_64.

New implementation is based on constraints, where "darwin" means OS (and
any CPU), while "darwin_x86_64" mean only specific CPU. As such they
cannot be used in the same select, because the selection would be
ambiguous.
  • Loading branch information
comius authored and alexeagle committed Nov 9, 2020
1 parent 2bff74d commit 0167236
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions toolchains/node/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ alias(
name = "toolchain",
actual = select({
"@bazel_tools//src/conditions:darwin": "@nodejs_darwin_amd64_config//:toolchain",
"@bazel_tools//src/conditions:darwin_x86_64": "@nodejs_darwin_amd64_config//:toolchain",
"@bazel_tools//src/conditions:linux_aarch64": "@nodejs_linux_arm64_config//:toolchain",
"@bazel_tools//src/conditions:linux_s390x": "@nodejs_linux_s390x_config//:toolchain",
"@bazel_tools//src/conditions:linux_x86_64": "@nodejs_linux_amd64_config//:toolchain",
Expand All @@ -93,7 +92,6 @@ alias(
name = "node_bin",
actual = select({
"@bazel_tools//src/conditions:darwin": "@nodejs_darwin_amd64//:node_bin",
"@bazel_tools//src/conditions:darwin_x86_64": "@nodejs_darwin_amd64//:node_bin",
"@bazel_tools//src/conditions:linux_aarch64": "@nodejs_linux_arm64//:node_bin",
"@bazel_tools//src/conditions:linux_s390x": "@nodejs_linux_s390x//:node_bin",
"@bazel_tools//src/conditions:linux_x86_64": "@nodejs_linux_amd64//:node_bin",
Expand Down

0 comments on commit 0167236

Please sign in to comment.