[cfe-commits] r132425 - /cfe/trunk/lib/Driver/Tools.cpp

Rafael Espindola rafael.espindola at gmail.com
Wed Jun 1 14:37:00 PDT 2011


Author: rafael
Date: Wed Jun  1 16:37:00 2011
New Revision: 132425

URL: http://llvm.org/viewvc/llvm-project?rev=132425&view=rev
Log:
Add the necessary -L option for finding libprofile_rt.a. It might be a good
idea at some point to split out the directories where we install our runtime
libraries.

Modified:
    cfe/trunk/lib/Driver/Tools.cpp

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=132425&r1=132424&r2=132425&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Wed Jun  1 16:37:00 2011
@@ -114,6 +114,11 @@
   // (constructed via -Xarch_).
   Args.AddAllArgValues(CmdArgs, options::OPT_Zlinker_input);
 
+  // Add our corresponding lib directory. This is necessary for finding libprofile_rt.a
+  // for example. This matches gcc's behaviour that adds
+  // -L<inst>/gcc/lib/gcc/<triple>/<ver> to the link line.
+  CmdArgs.push_back(Args.MakeArgString("-L" + TC.getDriver().Dir + "/../lib"));
+
   for (InputInfoList::const_iterator
          it = Inputs.begin(), ie = Inputs.end(); it != ie; ++it) {
     const InputInfo &II = *it;





More information about the cfe-commits mailing list