WindowsToolChain: decouple build environment from the toolchain
authorAlp Toker <alp@nuanti.com>
Sun, 22 Jun 2014 03:27:52 +0000 (03:27 +0000)
committerAlp Toker <alp@nuanti.com>
Sun, 22 Jun 2014 03:27:52 +0000 (03:27 +0000)
Don't try to find the MSVC version that the binaries were built with. Doing so
defeats testing by causing invalid test passes on the build servers.

Whichever Visual Studio (or clang-cl.exe) edition was used to build the clang
package, it's strictly orthogonal and has no relation to software versions
available on the user's PC.

llvm-svn: 211459

clang/lib/Driver/WindowsToolChain.cpp

index 20333e8..3f334d3 100644 (file)
@@ -253,23 +253,8 @@ static bool getVisualStudioDir(std::string &path) {
 
   const char *vscomntools = nullptr;
 
-  // Try to find the version that we were compiled with
-  if(false) {}
-  #if (_MSC_VER >= 1600)  // VC100
-  else if(vs100comntools) {
-    vscomntools = vs100comntools;
-  }
-  #elif (_MSC_VER == 1500) // VC80
-  else if(vs90comntools) {
-    vscomntools = vs90comntools;
-  }
-  #elif (_MSC_VER == 1400) // VC80
-  else if(vs80comntools) {
-    vscomntools = vs80comntools;
-  }
-  #endif
-  // Otherwise find any version we can
-  else if (vs100comntools)
+  // Find any version we can
+  if (vs100comntools)
     vscomntools = vs100comntools;
   else if (vs90comntools)
     vscomntools = vs90comntools;