diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/cpp/BUILD.static | 29 | ||||
-rw-r--r-- | tools/cpp/cc_configure.bzl | 2 |
2 files changed, 31 insertions, 0 deletions
diff --git a/tools/cpp/BUILD.static b/tools/cpp/BUILD.static index 8181a61755..6f5f585ece 100644 --- a/tools/cpp/BUILD.static +++ b/tools/cpp/BUILD.static @@ -31,6 +31,7 @@ filegroup( ":cc-compiler-armeabi-v7a", ":cc-compiler-freebsd", ":cc-compiler-x64_windows", + ":cc-compiler-x64_windows_msvc", ":empty", ], ) @@ -76,3 +77,31 @@ cc_toolchain( strip_files = ":empty", supports_param_files = 1, ) + +cc_toolchain( + name = "cc-compiler-x64_windows_msvc", + all_files = ":every-file-x64_windows", + compiler_files = ":compile-x64_windows", + cpu = "x64_windows", + dwp_files = ":empty", + dynamic_runtime_libs = [":empty"], + linker_files = ":empty", + objcopy_files = ":empty", + static_runtime_libs = [":empty"], + strip_files = ":empty", +) + +filegroup( + name = "every-file-x64_windows", + srcs = [ + ":compile-x64_windows", + ], +) + +filegroup( + name = "compile-x64_windows", + srcs = glob([ + "wrapper/bin/msvc_*", + "wrapper/bin/pydir/msvc*", + ]), +)
\ No newline at end of file diff --git a/tools/cpp/cc_configure.bzl b/tools/cpp/cc_configure.bzl index 9e196253ba..f06bcb2b4b 100644 --- a/tools/cpp/cc_configure.bzl +++ b/tools/cpp/cc_configure.bzl @@ -289,6 +289,8 @@ def _impl(repository_ctx): # Windows support is still experimental, let's not fiddle with autoconfiguration for now. repository_ctx.symlink(Label("@bazel_tools//tools/cpp:CROSSTOOL"), "CROSSTOOL") repository_ctx.symlink(Label("@bazel_tools//tools/cpp:BUILD.static"), "BUILD") + msvc_wrapper = repository_ctx.path(Label("@bazel_tools//tools/cpp:CROSSTOOL")).dirname.get_child("wrapper").get_child("bin") + repository_ctx.symlink(msvc_wrapper, "wrapper/bin") else: darwin = cpu_value == "darwin" cc = _find_cc(repository_ctx) |