Skip to content

Commit

Permalink
Bazel: Use @platforms//os:windows instead of @build_tools//src/condit…
Browse files Browse the repository at this point in the history
…ions:windows (KhronosGroup#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: KhronosGroup#5037
  • Loading branch information
dneto0 committed Dec 22, 2022
1 parent 077b09c commit f416d39
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions build_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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.
Expand Down

0 comments on commit f416d39

Please sign in to comment.