diff options
-rw-r--r-- | lib/Driver/ToolChains.cpp | 7 | ||||
-rw-r--r-- | test/Driver/darwin-arm.c | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index 3d692b0404..a5a48adcf0 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -213,6 +213,13 @@ DarwinClang::DarwinClang(const HostInfo &Host, const llvm::Triple& Triple, bool IsIPhoneOS) : Darwin(Host, Triple, DarwinVersion, IsIPhoneOS) { + // Add the relative libexec dir (for clang-cc). + // + // FIXME: We should sink clang-cc into libexec/clang/<version>/. + std::string Path = getHost().getDriver().Dir; + Path += "/../libexec"; + getProgramPaths().push_back(Path); + // We expect 'as', 'ld', etc. to be adjacent to our install dir. getProgramPaths().push_back(getHost().getDriver().Dir); } diff --git a/test/Driver/darwin-arm.c b/test/Driver/darwin-arm.c new file mode 100644 index 0000000000..8b4c23d557 --- /dev/null +++ b/test/Driver/darwin-arm.c @@ -0,0 +1,4 @@ +// RUN: clang -ccc-host-triple i386-apple-darwin9 -arch arm -print-search-dirs | FileCheck %s + +// Check that we look in the relative libexec directory. +// CHECK: {{programs: =.*/../libexec:}} |