llvm-mc: Tweak undefined symbol handling.
[oota-llvm.git] / lib / CompilerDriver / BuiltinOptions.cpp
1 //===--- BuiltinOptions.cpp - The LLVM Compiler Driver ----------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open
6 // Source License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 //  Definitions of all global command-line option variables.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #include "llvm/CompilerDriver/BuiltinOptions.h"
15
16 #ifdef ENABLE_LLVMC_DYNAMIC_PLUGINS
17 #include "llvm/Support/PluginLoader.h"
18 #endif
19
20 namespace cl = llvm::cl;
21
22 // External linkage here is intentional.
23
24 cl::list<std::string> InputFilenames(cl::Positional, cl::desc("<input file>"),
25                                      cl::ZeroOrMore);
26 cl::opt<std::string> OutputFilename("o", cl::desc("Output file name"),
27                                     cl::value_desc("file"), cl::Prefix);
28 cl::opt<std::string> TempDirname("temp-dir", cl::desc("Temp dir name"),
29                                  cl::value_desc("<directory>"), cl::Prefix);
30 cl::list<std::string> Languages("x",
31           cl::desc("Specify the language of the following input files"),
32           cl::ZeroOrMore);
33 cl::opt<bool> DryRun("dry-run",
34                      cl::desc("Only pretend to run commands"));
35 cl::opt<bool> VerboseMode("v",
36                           cl::desc("Enable verbose mode"));
37
38 cl::opt<bool> CheckGraph("check-graph",
39                          cl::desc("Check the compilation graph for errors"),
40                          cl::Hidden);
41 cl::opt<bool> WriteGraph("write-graph",
42                          cl::desc("Write compilation-graph.dot file"),
43                          cl::Hidden);
44 cl::opt<bool> ViewGraph("view-graph",
45                          cl::desc("Show compilation graph in GhostView"),
46                          cl::Hidden);
47
48 cl::opt<SaveTempsEnum::Values> SaveTemps
49 ("save-temps", cl::desc("Keep temporary files"),
50  cl::init(SaveTempsEnum::Unset),
51  cl::values(clEnumValN(SaveTempsEnum::Obj, "obj",
52                        "Save files in the directory specified with -o"),
53             clEnumValN(SaveTempsEnum::Cwd, "cwd",
54                        "Use current working directory"),
55             clEnumValN(SaveTempsEnum::Obj, "", "Same as 'cwd'"),
56             clEnumValEnd),
57  cl::ValueOptional);