Remove usage of COMPILER_MSVC in Bazel and ijar
Convert most `COMPILER_MSVC` to `_WIN32` (as they apply to Windows platform, not MSVC compiler). Only `src/tools/singlejar/zip_headers.h` and `src/main/cpp/util/md5.h` actually need `_MSC_VER`.
`COMPILER_MSVC` in `third_party/protobuf` are not removed. They can be fixed by updating dependency to newer version.
/cc @meteorcloudy
Closes #5350.
Change-Id: Ibc131abfaf34a0cb2bd338549983ea9d28eaabfe
PiperOrigin-RevId: 200019793
diff --git a/src/test/cpp/option_processor_test.cc b/src/test/cpp/option_processor_test.cc
index 10e55cf..d963fbb 100644
--- a/src/test/cpp/option_processor_test.cc
+++ b/src/test/cpp/option_processor_test.cc
@@ -319,7 +319,7 @@
ASSERT_EQ(expected, internal::DedupeBlazercPaths(input));
}
-#if !defined(COMPILER_MSVC) && !defined(__CYGWIN__)
+#if !defined(_WIN32) && !defined(__CYGWIN__)
static bool Symlink(const std::string& old_path, const std::string& new_path) {
return symlink(old_path.c_str(), new_path.c_str()) == 0;
}
@@ -334,6 +334,6 @@
std::vector<std::string> expected = {foo_path};
ASSERT_EQ(expected, internal::DedupeBlazercPaths(input));
}
-#endif // !defined(COMPILER_MSVC) && !defined(__CYGWIN__)
+#endif // !defined(_WIN32) && !defined(__CYGWIN__)
} // namespace blaze