summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit+github@google.com>2022-02-18 15:05:10 +0100
committerDavid 'Digit' Turner <digit+github@google.com>2022-03-11 16:22:13 +0100
commit66b05496ff0ef6114e3534418c970dd92d34accb (patch)
treecfc2cfcec6d8a624d60c735e1dd1691afa422ee2
parent7923d736c108cf19e15aa53f5a3fa30582530abb (diff)
downloadninja-66b05496ff0ef6114e3534418c970dd92d34accb.tar.gz
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
-rw-r--r--src/ninja.cc8
1 files changed, 4 insertions, 4 deletions
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 @@ int NinjaMain::ToolBrowse(const Options*, int, char**) {
}
#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 @@ const Tool* ChooseTool(const string& tool_name) {
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",