From 4022bac855a790b3a42fcb44c06f62dbbe078c5a Mon Sep 17 00:00:00 2001 From: Loo Rong Jie Date: Mon, 11 Jun 2018 02:04:52 -0700 Subject: 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 --- src/main/cpp/startup_options.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/cpp/startup_options.cc') diff --git a/src/main/cpp/startup_options.cc b/src/main/cpp/startup_options.cc index 67e0d55add..8f028f55c6 100644 --- a/src/main/cpp/startup_options.cc +++ b/src/main/cpp/startup_options.cc @@ -108,13 +108,13 @@ StartupOptions::StartupOptions(const string &product_name, << "'."; } -#if defined(COMPILER_MSVC) || defined(__CYGWIN__) +#if defined(_WIN32) || defined(__CYGWIN__) string windows_unix_root = WindowsUnixRoot(blaze::GetEnv("BAZEL_SH")); if (!windows_unix_root.empty()) { host_jvm_args.push_back(string("-Dbazel.windows_unix_root=") + windows_unix_root); } -#endif // defined(COMPILER_MSVC) || defined(__CYGWIN__) +#endif // defined(_WIN32) || defined(__CYGWIN__) const string product_name_lower = GetLowercaseProductName(); output_user_root = blaze_util::JoinPath( @@ -528,7 +528,7 @@ blaze_exit_code::ExitCode StartupOptions::AddJVMMemoryArguments( return blaze_exit_code::SUCCESS; } -#if defined(COMPILER_MSVC) || defined(__CYGWIN__) +#if defined(_WIN32) || defined(__CYGWIN__) // Extract the Windows path of "/" from $BAZEL_SH. // $BAZEL_SH usually has the form `/usr/bin/bash.exe` or // `/bin/bash.exe`, and this method returns that `` part. @@ -554,6 +554,6 @@ string StartupOptions::WindowsUnixRoot(const string &bazel_sh) { return split.first; } } -#endif // defined(COMPILER_MSVC) || defined(__CYGWIN__) +#endif // defined(_WIN32) || defined(__CYGWIN__) } // namespace blaze -- cgit v1.2.3