]> granicus.if.org Git - clang/commitdiff
Fix truck sized thinko where Darwin/ARM toolchain didn't look for programs in
authorDaniel Dunbar <daniel@zuster.org>
Tue, 29 Sep 2009 18:52:10 +0000 (18:52 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Tue, 29 Sep 2009 18:52:10 +0000 (18:52 +0000)
libexec, *blush*.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83086 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChains.cpp
test/Driver/darwin-arm.c [new file with mode: 0644]

index 3d692b0404012d692a48f74ad56e6ac6bbb8f971..a5a48adcf0285b41d342543cf023b4ba8c3209f3 100644 (file)
@@ -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 (file)
index 0000000..8b4c23d
--- /dev/null
@@ -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:}}