diff options
| author | Tim Northover <tnorthover@apple.com> | 2014-05-22 13:12:14 +0000 |
|---|---|---|
| committer | Tim Northover <tnorthover@apple.com> | 2014-05-22 13:12:14 +0000 |
| commit | 15ff71deea1652f7312d899e706560544f6f7878 (patch) | |
| tree | f9633b4d3822861dfb51c074f392d3b388fe33cc /clang | |
| parent | f9e798ba6a8b0907c58ef3e6733cac4026baaebc (diff) | |
| download | bcm5719-llvm-15ff71deea1652f7312d899e706560544f6f7878.tar.gz bcm5719-llvm-15ff71deea1652f7312d899e706560544f6f7878.zip | |
MachO: look for nearby tools on all MachO platforms.
This brings "-arch armv7m" (etc) behaviour more in line with what's expected
for developers on OS X, and allows Clang to find an "ld" (for example) in the
same directory instead of using the default /usr/bin/ld.
Unfortunately no test because it relies on the specific place Clang is running
from.
rdar://problem/16427320
llvm-svn: 209437
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/lib/Driver/ToolChains.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp index c0829021fc1..5f9b19c3ff7 100644 --- a/clang/lib/Driver/ToolChains.cpp +++ b/clang/lib/Driver/ToolChains.cpp @@ -45,6 +45,14 @@ using namespace llvm::opt; MachO::MachO(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) : ToolChain(D, Triple, Args) { + getProgramPaths().push_back(getDriver().getInstalledDir()); + if (getDriver().getInstalledDir() != getDriver().Dir) + getProgramPaths().push_back(getDriver().Dir); + + // We expect 'as', 'ld', etc. to be adjacent to our install dir. + getProgramPaths().push_back(getDriver().getInstalledDir()); + if (getDriver().getInstalledDir() != getDriver().Dir) + getProgramPaths().push_back(getDriver().Dir); } /// Darwin - Darwin tool chain for i386 and x86_64. @@ -232,14 +240,6 @@ Tool *MachO::buildAssembler() const { DarwinClang::DarwinClang(const Driver &D, const llvm::Triple& Triple, const ArgList &Args) : Darwin(D, Triple, Args) { - getProgramPaths().push_back(getDriver().getInstalledDir()); - if (getDriver().getInstalledDir() != getDriver().Dir) - getProgramPaths().push_back(getDriver().Dir); - - // We expect 'as', 'ld', etc. to be adjacent to our install dir. - getProgramPaths().push_back(getDriver().getInstalledDir()); - if (getDriver().getInstalledDir() != getDriver().Dir) - getProgramPaths().push_back(getDriver().Dir); } void DarwinClang::addClangWarningOptions(ArgStringList &CC1Args) const { |

