Skip to content

Commit

Permalink
Add windows_msvc back to conditions in bazel_tools.
Browse files Browse the repository at this point in the history
This is partial revert of 6d637f4 and a fix to a06d7e1, which went into wrong file.

windows_msvc condition is used downstream by tensorflow via ruy.

The culprit line is in https://github.com/google/ruy/blob/master/ruy/build_defs.bzl#L60 (and #L67,#L77).

Closes bazelbuild#12668.

PiperOrigin-RevId: 346540473
  • Loading branch information
comius authored and meisterT committed Jan 13, 2021
1 parent 4158a6f commit f6d30cf
Showing 1 changed file with 43 additions and 12 deletions.
55 changes: 43 additions & 12 deletions src/conditions/BUILD.tools
Original file line number Diff line number Diff line change
@@ -1,72 +1,103 @@
config_setting(
name = "freebsd",
constraint_values = [ "@platforms//os:freebsd"],
constraint_values = ["@platforms//os:freebsd"],
visibility = ["//visibility:public"],
)

config_setting(
name = "openbsd",
constraint_values = [ "@platforms//os:openbsd"],
constraint_values = ["@platforms//os:openbsd"],
visibility = ["//visibility:public"],
)

config_setting(
name = "darwin",
constraint_values = [ "@platforms//os:macos" ],
constraint_values = ["@platforms//os:macos"],
visibility = ["//visibility:public"],
)

config_setting(
name = "linux_ppc",
constraint_values = [ "@platforms//os:linux", "@platforms//cpu:ppc" ],
constraint_values = [
"@platforms//os:linux",
"@platforms//cpu:ppc",
],
visibility = ["//visibility:public"],
)

config_setting(
name = "linux_ppc64le",
constraint_values = [ "@platforms//os:linux", "@platforms//cpu:ppc" ],
constraint_values = [
"@platforms//os:linux",
"@platforms//cpu:ppc",
],
visibility = ["//visibility:public"],
)

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

config_setting(
name = "linux_x86_64",
constraint_values = [ "@platforms//os:linux", "@platforms//cpu:x86_64" ],
constraint_values = [
"@platforms//os:linux",
"@platforms//cpu:x86_64",
],
visibility = ["//visibility:public"],
)

config_setting(
name = "linux_aarch64",
constraint_values = [ "@platforms//os:linux", "@platforms//cpu:aarch64" ],
constraint_values = [
"@platforms//os:linux",
"@platforms//cpu:aarch64",
],
visibility = ["//visibility:public"],
)

config_setting(
name = "darwin_x86_64",
constraint_values = [ "@platforms//os:macos", "@platforms//cpu:x86_64" ],
constraint_values = [
"@platforms//os:macos",
"@platforms//cpu:x86_64",
],
visibility = ["//visibility:public"],
)

config_setting(
name = "darwin_arm64",
constraint_values = [ "@platforms//os:macos", "@platforms//cpu:arm64" ],
constraint_values = [
"@platforms//os:macos",
"@platforms//cpu:arm64",
],
visibility = ["//visibility:public"],
)

config_setting(
name = "darwin_arm64e",
constraint_values = [ "@platforms//os:macos", "@platforms//cpu:arm64e" ],
constraint_values = [
"@platforms//os:macos",
"@platforms//cpu:arm64e",
],
visibility = ["//visibility:public"],
)

config_setting(
name = "windows",
constraint_values = [ "@platforms//os:windows"],
constraint_values = ["@platforms//os:windows"],
visibility = ["//visibility:public"],
)

# TODO: figure out how to base this selection on constraints
config_setting(
name = "windows_msvc",
values = {"cpu": "x64_windows_msvc"},
visibility = ["//visibility:public"],
)

Expand Down

0 comments on commit f6d30cf

Please sign in to comment.