llvm/llvm-3.2-llvm-config-dso-hack.patch

30 lines
1.1 KiB
Diff

diff -up llvm-3.2.src/tools/llvm-config/llvm-config.cpp.jx llvm-3.2.src/tools/llvm-config/llvm-config.cpp
--- llvm-3.2.src/tools/llvm-config/llvm-config.cpp.jx 2013-03-07 07:13:24.000000000 -0500
+++ llvm-3.2.src/tools/llvm-config/llvm-config.cpp 2013-03-07 07:39:26.485677609 -0500
@@ -316,7 +316,9 @@ int main(int argc, char **argv) {
if (!HasAnyOption)
usage();
- if (PrintLibs || PrintLibNames || PrintLibFiles) {
+ if (PrintLibs) {
+ OS << "-lLLVM-3.2svn";
+ } else if (PrintLibNames || PrintLibFiles) {
// If no components were specified, default to "all".
if (Components.empty())
Components.push_back("all");
@@ -335,15 +337,6 @@ int main(int argc, char **argv) {
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;
}
}
OS << '\n';