aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Neto <dneto@google.com>2022-12-22 08:13:40 -0500
committerGitHub <noreply@github.com>2022-12-22 08:13:40 -0500
commitf416d39bb80957b3ba870f97929cd374f5403a17 (patch)
treeeca934c8af363444c897ef23bcc97ec2cfffe1b7
parent077b09c32a9b8192139bcb74c253cc0ae9d95182 (diff)
downloadspirv-tools-f416d39bb80957b3ba870f97929cd374f5403a17.tar.gz
Bazel: Use @platforms//os:windows instead of @build_tools//src/conditions:windows (#5042)
Bazel has been changing its conventions for implementing conditions on target OS. Update to the latest recommendation. See https://bazel.build/extending/platforms Silences a deprecation warning. Fixes: #5037
-rw-r--r--build_defs.bzl6
1 files changed, 4 insertions, 2 deletions
diff --git a/build_defs.bzl b/build_defs.bzl
index a94a4252..3a69de5c 100644
--- a/build_defs.bzl
+++ b/build_defs.bzl
@@ -4,7 +4,9 @@ COMMON_COPTS = [
"-DSPIRV_CHECK_CONTEXT",
"-DSPIRV_COLOR_TERMINAL",
] + select({
- "@bazel_tools//src/conditions:windows": [],
+ # On Windows, assume MSVC.
+ # C++14 is the default in VisualStudio 2017.
+ "@platforms//os:windows": [],
"//conditions:default": [
"-DSPIRV_LINUX",
"-DSPIRV_TIMER_ENABLED",
@@ -27,7 +29,7 @@ COMMON_COPTS = [
TEST_COPTS = COMMON_COPTS + [
] + select({
- "@bazel_tools//src/conditions:windows": [
+ "@platforms//os:windows": [
# Disable C4503 "decorated name length exceeded" warning,
# triggered by some heavily templated types.
# We don't care much about that in test code.