[cfe-commits] r135344 - /cfe/trunk/lib/Driver/Driver.cpp
Joerg Sonnenberger
joerg at bec.de
Sat Jul 16 03:50:05 PDT 2011
Author: joerg
Date: Sat Jul 16 05:50:05 2011
New Revision: 135344
URL: http://llvm.org/viewvc/llvm-project?rev=135344&view=rev
Log:
Correctly handle sysroot prefix in -print-search-dirs. Makes libtool
more happy on NetBSD.
Modified:
cfe/trunk/lib/Driver/Driver.cpp
Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=135344&r1=135343&r2=135344&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Sat Jul 16 05:50:05 2011
@@ -458,11 +458,20 @@
}
llvm::outs() << "\n";
llvm::outs() << "libraries: =";
+
+ std::string sysroot;
+ if (Arg *A = C.getArgs().getLastArg(options::OPT__sysroot_EQ))
+ sysroot = A->getValue(C.getArgs());
+
for (ToolChain::path_list::const_iterator it = TC.getFilePaths().begin(),
ie = TC.getFilePaths().end(); it != ie; ++it) {
if (it != TC.getFilePaths().begin())
llvm::outs() << ':';
- llvm::outs() << *it;
+ const char *path = it->c_str();
+ if (path[0] == '=')
+ llvm::outs() << sysroot << path + 1;
+ else
+ llvm::outs() << path;
}
llvm::outs() << "\n";
return false;
More information about the cfe-commits
mailing list