[cfe-commits] r141126 - /cfe/trunk/lib/Driver/ToolChains.cpp

Chandler Carruth chandlerc at gmail.com
Tue Oct 4 15:22:14 PDT 2011


Author: chandlerc
Date: Tue Oct  4 17:22:13 2011
New Revision: 141126

URL: http://llvm.org/viewvc/llvm-project?rev=141126&view=rev
Log:
Fix Windows+MinGW which introduces noise into path separators.

There should be a better solution to this; Michael and I are continuing
to discuss exactly what it should be. The one solution I'm very
uncomfortable with is making the FileCheck tests use a regex for each
path separator.

Modified:
    cfe/trunk/lib/Driver/ToolChains.cpp

Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=141126&r1=141125&r2=141126&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Tue Oct  4 17:22:13 2011
@@ -1685,7 +1685,11 @@
 
               BestVersion = CandidateVersion;
               GccTriple = CandidateTriple.str();
-              GccInstallPath = LI->path();
+              // FIXME: We hack together the directory name here instead of
+              // using LI to ensure stable path separators across Windows and
+              // Linux.
+              GccInstallPath = (TripleDir + Suffixes[l] + "/" +
+                                VersionText.str());
               GccParentLibPath = GccInstallPath + InstallSuffixes[l];
               IsValid = true;
             }





More information about the cfe-commits mailing list