summaryrefslogtreecommitdiff
path: root/lib/ToolDrivers/llvm-lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ToolDrivers/llvm-lib')
-rw-r--r--lib/ToolDrivers/llvm-lib/LibDriver.cpp6
-rw-r--r--lib/ToolDrivers/llvm-lib/Options.td6
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/ToolDrivers/llvm-lib/LibDriver.cpp b/lib/ToolDrivers/llvm-lib/LibDriver.cpp
index f5cf848aa8c7..d636dca7a2c7 100644
--- a/lib/ToolDrivers/llvm-lib/LibDriver.cpp
+++ b/lib/ToolDrivers/llvm-lib/LibDriver.cpp
@@ -121,6 +121,12 @@ int llvm::libDriverMain(ArrayRef<const char *> ArgsArr) {
for (auto *Arg : Args.filtered(OPT_UNKNOWN))
llvm::errs() << "ignoring unknown argument: " << Arg->getSpelling() << "\n";
+ // Handle /help
+ if (Args.hasArg(OPT_help)) {
+ Table.PrintHelp(outs(), ArgsArr[0], "LLVM Lib");
+ return 0;
+ }
+
// If no input files, silently do nothing to match lib.exe.
if (!Args.hasArgNoClaim(OPT_INPUT))
return 0;
diff --git a/lib/ToolDrivers/llvm-lib/Options.td b/lib/ToolDrivers/llvm-lib/Options.td
index 5a56ef7468d4..dd41952b7878 100644
--- a/lib/ToolDrivers/llvm-lib/Options.td
+++ b/lib/ToolDrivers/llvm-lib/Options.td
@@ -12,7 +12,11 @@ class P<string name, string help> :
def libpath: P<"libpath", "Object file search path">;
def out : P<"out", "Path to file to write output">;
-def llvmlibthin : F<"llvmlibthin">;
+def llvmlibthin : F<"llvmlibthin">,
+ HelpText<"Make .lib point to .obj files instead of copying their contents">;
+
+def help : F<"help">;
+def help_q : Flag<["/?", "-?"], "">, Alias<help>;
//==============================================================================
// The flags below do nothing. They are defined only for lib.exe compatibility.