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

This commit is contained in:
Adam Jackson 2013-03-08 06:04:03 -05:00
parent 97e156aa42
commit bd03f325e1

View File

@ -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';