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); } } };