mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 00:11:00 +00:00
Don't emit a blank line when running llvm-config --system-libs.
Summary: Previously llvm-config --system-libs would print something like: $ llvm-config --system-libs -lz -ltinfo -lrt -ldl -lm Now we don't emit blank line. Functionality is unchanged otherwise, in particular llvm-config --libs --system-libs still emits the LLVM libraries and the system libraries on different lines. Reviewers: chapuni Reviewed By: chapuni CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2901 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202719 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fc210ac1ef
commit
7bc65d0ad7
@ -345,27 +345,29 @@ int main(int argc, char **argv) {
|
||||
ComputeLibsForComponents(Components, RequiredLibs,
|
||||
/*IncludeNonInstalled=*/IsInDevelopmentTree);
|
||||
|
||||
for (unsigned i = 0, e = RequiredLibs.size(); i != e; ++i) {
|
||||
StringRef Lib = RequiredLibs[i];
|
||||
if (i)
|
||||
OS << ' ';
|
||||
if (PrintLibs || PrintLibNames || PrintLibFiles) {
|
||||
for (unsigned i = 0, e = RequiredLibs.size(); i != e; ++i) {
|
||||
StringRef Lib = RequiredLibs[i];
|
||||
if (i)
|
||||
OS << ' ';
|
||||
|
||||
if (PrintLibNames) {
|
||||
OS << Lib;
|
||||
} else if (PrintLibFiles) {
|
||||
OS << ActiveLibDir << '/' << Lib;
|
||||
} else if (PrintLibs) {
|
||||
// If this is a typical library name, include it using -l.
|
||||
if (Lib.startswith("lib") && Lib.endswith(".a")) {
|
||||
OS << "-l" << Lib.slice(3, Lib.size()-2);
|
||||
continue;
|
||||
if (PrintLibNames) {
|
||||
OS << Lib;
|
||||
} else if (PrintLibFiles) {
|
||||
OS << ActiveLibDir << '/' << Lib;
|
||||
} else if (PrintLibs) {
|
||||
// If this is a typical library name, include it using -l.
|
||||
if (Lib.startswith("lib") && Lib.endswith(".a")) {
|
||||
OS << "-l" << Lib.slice(3, Lib.size()-2);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Otherwise, print the full path.
|
||||
OS << ActiveLibDir << '/' << Lib;
|
||||
}
|
||||
|
||||
// Otherwise, print the full path.
|
||||
OS << ActiveLibDir << '/' << Lib;
|
||||
}
|
||||
OS << '\n';
|
||||
}
|
||||
OS << '\n';
|
||||
|
||||
// Print SYSTEM_LIBS after --libs.
|
||||
// FIXME: Each LLVM component may have its dependent system libs.
|
||||
|
Loading…
Reference in New Issue
Block a user