[PATCH] D17358: llvm-config: Don't check for "lib" prefix
Jan Vesely via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 17 16:12:10 PST 2016
jvesely created this revision.
jvesely added reviewers: ehsan, rnk.
jvesely added a subscriber: llvm-commits.
GetComponentLibraryNameSlice() already checks that.
Using BUILD_SHARED_LIBS
AC->Library provides library name without prefix or suffix so this check would always fail.
Fixes libtool linking breakage in mesa since r206263: llvm-config: Add preliminary Windows support
--libs output should be different from --libfiles, the latter cannot be used with libtool
http://reviews.llvm.org/D17358
Files:
tools/llvm-config/llvm-config.cpp
Index: tools/llvm-config/llvm-config.cpp
===================================================================
--- tools/llvm-config/llvm-config.cpp
+++ tools/llvm-config/llvm-config.cpp
@@ -671,15 +671,10 @@
} else if (PrintLibs) {
// If this is a typical library name, include it using -l.
StringRef LibName;
- if (Lib.startswith("lib")) {
- if (GetComponentLibraryNameSlice(Lib, LibName)) {
- OS << "-l" << LibName;
- } else {
- OS << "-l:" << GetComponentLibraryFileName(Lib, Shared);
- }
+ if (GetComponentLibraryNameSlice(Lib, LibName)) {
+ OS << "-l" << LibName;
} else {
- // Otherwise, print the full path.
- OS << GetComponentLibraryPath(Lib, Shared);
+ OS << "-l:" << GetComponentLibraryFileName(Lib, Shared);
}
}
};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17358.48257.patch
Type: text/x-patch
Size: 916 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160218/ba53893c/attachment.bin>
More information about the llvm-commits
mailing list