Add msvc crosstool definiton
This patch add the msvc crosstool definiton to CROSSTOOL file and BUILD file.
Two paths are expected to exist:
for msvc: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/
for windows sdk: C:/Program Files (x86)/Windows Kits/10/
--
Change-Id: I2b21e566a588459f9fef767c5dc9dab1565d1ae8
Reviewed-on: https://bazel-review.googlesource.com/#/c/3266
MOS_MIGRATED_REVID=119276027
diff --git a/tools/cpp/BUILD b/tools/cpp/BUILD
index cd671e1..70454cc 100644
--- a/tools/cpp/BUILD
+++ b/tools/cpp/BUILD
@@ -37,6 +37,7 @@
":cc-compiler-freebsd",
":cc-compiler-local",
":cc-compiler-x64_windows",
+ ":cc-compiler-x64_windows_msvc",
":empty",
],
)
@@ -125,6 +126,34 @@
supports_param_files = 0,
)
+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*",
+ ]),
+)
+
filegroup(
name = "srcs",
srcs = glob(["**"]) + ["//tools/cpp/test:srcs"],