Ensure the `msvc` tool is built in all Win32 Ninja binaries.
It was only previously available when Ninja was built when
`_MSVC` is defined (i.e. when compiling with the Microsoft
compiler of with `clang-cl`).
+ Tag the tool as DEPRECATED
diff --git a/src/ninja.cc b/src/ninja.cc
index 71dea21..ad0912e 100644
--- a/src/ninja.cc
+++ b/src/ninja.cc
@@ -52,7 +52,7 @@
using namespace std;
-#ifdef _MSC_VER
+#ifdef _WIN32
// Defined in msvc_helper_main-win32.cc.
int MSVCHelperMain(int argc, char** argv);
@@ -449,7 +449,7 @@
}
#endif
-#if defined(_MSC_VER)
+#if defined(_WIN32)
int NinjaMain::ToolMSVC(const Options* options, int argc, char* argv[]) {
// Reset getopt: push one argument onto the front of argv, reset optind.
argc++;
@@ -1043,8 +1043,8 @@
static const Tool kTools[] = {
{ "browse", "browse dependency graph in a web browser",
Tool::RUN_AFTER_LOAD, &NinjaMain::ToolBrowse },
-#if defined(_MSC_VER)
- { "msvc", "build helper for MSVC cl.exe (EXPERIMENTAL)",
+#ifdef _WIN32
+ { "msvc", "build helper for MSVC cl.exe (DEPRECATED)",
Tool::RUN_AFTER_FLAGS, &NinjaMain::ToolMSVC },
#endif
{ "clean", "clean built files",