[cfe-commits] r127897 - /cfe/trunk/lib/Driver/ToolChains.cpp
Daniel Dunbar
daniel at zuster.org
Fri Mar 18 12:25:15 PDT 2011
Author: ddunbar
Date: Fri Mar 18 14:25:15 2011
New Revision: 127897
URL: http://llvm.org/viewvc/llvm-project?rev=127897&view=rev
Log:
Driver/Darwin: Change fallback to use llvm-gcc search paths instead of GCC.
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=127897&r1=127896&r2=127897&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Fri Mar 18 14:25:15 2011
@@ -222,6 +222,8 @@
DarwinClang::DarwinClang(const HostInfo &Host, const llvm::Triple& Triple)
: Darwin(Host, Triple)
{
+ std::string UsrPrefix = "llvm-gcc-4.2/";
+
getProgramPaths().push_back(getDriver().getInstalledDir());
if (getDriver().getInstalledDir() != getDriver().Dir)
getProgramPaths().push_back(getDriver().Dir);
@@ -232,18 +234,18 @@
getProgramPaths().push_back(getDriver().Dir);
// For fallback, we need to know how to find the GCC cc1 executables, so we
- // also add the GCC libexec paths. This is legiy code that can be removed once
- // fallback is no longer useful.
+ // also add the GCC libexec paths. This is legacy code that can be removed
+ // once fallback is no longer useful.
std::string ToolChainDir = "i686-apple-darwin";
ToolChainDir += llvm::utostr(DarwinVersion[0]);
ToolChainDir += "/4.2.1";
std::string Path = getDriver().Dir;
- Path += "/../libexec/gcc/";
+ Path += "/../" + UsrPrefix + "libexec/gcc/";
Path += ToolChainDir;
getProgramPaths().push_back(Path);
- Path = "/usr/libexec/gcc/";
+ Path = "/usr/" + UsrPrefix + "libexec/gcc/";
Path += ToolChainDir;
getProgramPaths().push_back(Path);
}
More information about the cfe-commits
mailing list