aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Driver/ToolChains.cpp8
-rw-r--r--tools/ccc/ccclib/ToolChain.py4
-rw-r--r--tools/clang-cc/Makefile4
3 files changed, 16 insertions, 0 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index eac72ee65a..d4e8e93e2a 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -74,6 +74,10 @@ Darwin_X86::Darwin_X86(const HostInfo &Host, const char *Arch,
Path += getToolChainDir();
getProgramPaths().push_back(Path);
+ Path = getHost().getDriver().Dir;
+ Path += "/../libexec";
+ getProgramPaths().push_back(Path);
+
getProgramPaths().push_back(getHost().getDriver().Dir);
}
@@ -151,6 +155,10 @@ Generic_GCC::Generic_GCC(const HostInfo &Host, const char *Arch,
const char *Platform, const char *OS)
: ToolChain(Host, Arch, Platform, OS)
{
+ std::string Path(getHost().getDriver().Dir);
+ Path += "/../libexec";
+ getProgramPaths().push_back(Path);
+
getProgramPaths().push_back(getHost().getDriver().Dir);
}
diff --git a/tools/ccc/ccclib/ToolChain.py b/tools/ccc/ccclib/ToolChain.py
index 5e6f2e05c0..be949e7034 100644
--- a/tools/ccc/ccclib/ToolChain.py
+++ b/tools/ccc/ccclib/ToolChain.py
@@ -139,6 +139,8 @@ class Darwin_X86_ToolChain(ToolChain):
self.getToolChainDir()))
self.programPathPrefixes.append(os.path.join('/usr/libexec/gcc',
self.getToolChainDir()))
+ self.programPathPrefixes.append(os.path.join(self.driver.driverDir,
+ '../libexec'))
self.programPathPrefixes.append(self.driver.driverDir)
def getToolChainDir(self):
@@ -262,6 +264,8 @@ class Generic_GCC_ToolChain(ToolChain):
Phases.AssemblePhase : Tools.GCC_AssembleTool(self),
Phases.LinkPhase : Tools.GCC_LinkTool(self),
}
+ self.programPathPrefixes.append(os.path.join(self.driver.driverDir,
+ '../libexec'))
self.programPathPrefixes.append(self.driver.driverDir)
def selectTool(self, action):
diff --git a/tools/clang-cc/Makefile b/tools/clang-cc/Makefile
index 4539665d2e..d86ce7efbd 100644
--- a/tools/clang-cc/Makefile
+++ b/tools/clang-cc/Makefile
@@ -25,4 +25,8 @@ USEDLIBS = clangCodeGen.a clangAnalysis.a clangRewrite.a clangSema.a \
clangFrontend.a clangAST.a clangParse.a clangLex.a \
clangBasic.a
+# clang-cc lives in a special location; we can get away with this
+# because nothing else gets installed from here.
+PROJ_bindir := $(DESTDIR)$(PROJ_prefix)/libexec
+
include $(LLVM_SRC_ROOT)/Makefile.rules