From 82fa7c5b9dc5024893a6e63a2550896f74962376 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Tue, 24 Mar 2009 04:07:10 +0000 Subject: [PATCH] Install clang-cc to libexec/clang-cc (instead of bin/clang-cc). - Updated ccc & driver to look in libexec/ for tools. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67607 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Driver/ToolChains.cpp | 8 ++++++++ tools/ccc/ccclib/ToolChain.py | 4 ++++ tools/clang-cc/Makefile | 4 ++++ 3 files changed, 16 insertions(+) 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 -- 2.40.0