OSDN Git Service

Build KillTheDoctor with mingw-w64
authorReid Kleckner <rnk@google.com>
Thu, 22 Dec 2016 19:11:42 +0000 (19:11 +0000)
committerReid Kleckner <rnk@google.com>
Thu, 22 Dec 2016 19:11:42 +0000 (19:11 +0000)
compiler-rt uses it in its lit tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290357 91177308-0d34-0410-b5e6-96231b3b80d8

CMakeLists.txt
utils/KillTheDoctor/KillTheDoctor.cpp

index f209338..64b33f2 100644 (file)
@@ -878,7 +878,7 @@ if( LLVM_INCLUDE_TESTS )
   endif()
   add_subdirectory(test)
   add_subdirectory(unittests)
-  if (MSVC)
+  if (WIN32)
     # This utility is used to prevent crashing tests from calling Dr. Watson on
     # Windows.
     add_subdirectory(utils/KillTheDoctor)
index c9e9661..b3ec134 100644 (file)
@@ -349,7 +349,7 @@ int main(int argc, char **argv) {
   ::_set_error_mode(_OUT_TO_STDERR);
 
   BOOL success = ::CreateProcessA(ProgramToRun.c_str(),
-                            LPSTR(CommandLine.c_str()),
+                                  const_cast<LPSTR>(CommandLine.c_str()),
                                   NULL,
                                   NULL,
                                   FALSE,