[llvm] a pre-push hook to check if you +PatchN'd and didn't git-add might be cool

Adam Jackson ajax at fedoraproject.org
Fri Mar 8 18:08:35 UTC 2013


commit bd03f325e13e6f4c9ef6f516fb0ffee5cd7bb2e5
Author: Adam Jackson <ajax at redhat.com>
Date:   Fri Mar 8 06:04:03 2013 -0500

    a pre-push hook to check if you +PatchN'd and didn't git-add might be cool

 llvm-3.2-llvm-config-dso-hack.patch |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)
---
diff --git a/llvm-3.2-llvm-config-dso-hack.patch b/llvm-3.2-llvm-config-dso-hack.patch
new file mode 100644
index 0000000..00dc39f
--- /dev/null
+++ b/llvm-3.2-llvm-config-dso-hack.patch
@@ -0,0 +1,30 @@
+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';


More information about the scm-commits mailing list