diff options
-rw-r--r-- | .bazelrc | 6 | ||||
-rw-r--r-- | BUILD.bazel | 9 |
2 files changed, 15 insertions, 0 deletions
@@ -1,4 +1,5 @@ build --incompatible_strict_action_env +build --enable_platform_specific_config build -c opt # C/C++ @@ -15,6 +16,11 @@ build:ci --features=layering_check build --java_language_version=8 build --tool_java_language_version=9 +# Windows +# Only compiles with clang on Windows. +build:windows --extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows-clang-cl +build:windows --extra_execution_platforms=//:x64_windows-clang-cl + # Toolchain build:toolchain --extra_toolchains=@llvm_toolchain//:cc-toolchain-linux,@llvm_toolchain//:cc-toolchain-darwin build:toolchain --//third_party:toolchain diff --git a/BUILD.bazel b/BUILD.bazel index e59b1a21..ebd0f993 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -77,3 +77,12 @@ alias( "//conditions:default": ":clang", }), ) + +platform( + name = "x64_windows-clang-cl", + constraint_values = [ + "@platforms//cpu:x86_64", + "@platforms//os:windows", + "@bazel_tools//tools/cpp:clang-cl", + ], +) |