Mikhail Glushenkov | 95c1f5b | 2009-06-29 03:09:15 +0000 | [diff] [blame] | 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" |
Mikhail Glushenkov | cc4f8bc | 2009-07-04 03:55:25 +0000 | [diff] [blame] | 15 | |
| 16 | #ifdef ENABLE_LLVMC_DYNAMIC_PLUGINS |
Mikhail Glushenkov | 95c1f5b | 2009-06-29 03:09:15 +0000 | [diff] [blame] | 17 | #include "llvm/Support/PluginLoader.h" |
Mikhail Glushenkov | cc4f8bc | 2009-07-04 03:55:25 +0000 | [diff] [blame] | 18 | #endif |
Mikhail Glushenkov | 95c1f5b | 2009-06-29 03:09:15 +0000 | [diff] [blame] | 19 | |
| 20 | namespace cl = llvm::cl; |
| 21 | |
Mikhail Glushenkov | 03b6d4e | 2010-08-20 11:24:44 +0000 | [diff] [blame] | 22 | namespace llvmc { |
Mikhail Glushenkov | 95c1f5b | 2009-06-29 03:09:15 +0000 | [diff] [blame] | 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); |
Mikhail Glushenkov | 3a780d1 | 2009-07-09 19:36:08 +0000 | [diff] [blame] | 28 | cl::opt<std::string> TempDirname("temp-dir", cl::desc("Temp dir name"), |
| 29 | cl::value_desc("<directory>"), cl::Prefix); |
Mikhail Glushenkov | 95c1f5b | 2009-06-29 03:09:15 +0000 | [diff] [blame] | 30 | cl::list<std::string> Languages("x", |
| 31 | cl::desc("Specify the language of the following input files"), |
| 32 | cl::ZeroOrMore); |
Mikhail Glushenkov | 6533afe | 2009-11-07 06:33:58 +0000 | [diff] [blame] | 33 | |
Mikhail Glushenkov | 95c1f5b | 2009-06-29 03:09:15 +0000 | [diff] [blame] | 34 | cl::opt<bool> DryRun("dry-run", |
| 35 | cl::desc("Only pretend to run commands")); |
Mikhail Glushenkov | 6533afe | 2009-11-07 06:33:58 +0000 | [diff] [blame] | 36 | cl::opt<bool> Time("time", cl::desc("Time individual commands")); |
Mikhail Glushenkov | 95c1f5b | 2009-06-29 03:09:15 +0000 | [diff] [blame] | 37 | cl::opt<bool> VerboseMode("v", |
| 38 | cl::desc("Enable verbose mode")); |
| 39 | |
| 40 | cl::opt<bool> CheckGraph("check-graph", |
| 41 | cl::desc("Check the compilation graph for errors"), |
| 42 | cl::Hidden); |
| 43 | cl::opt<bool> WriteGraph("write-graph", |
| 44 | cl::desc("Write compilation-graph.dot file"), |
| 45 | cl::Hidden); |
| 46 | cl::opt<bool> ViewGraph("view-graph", |
| 47 | cl::desc("Show compilation graph in GhostView"), |
| 48 | cl::Hidden); |
| 49 | |
| 50 | cl::opt<SaveTempsEnum::Values> SaveTemps |
| 51 | ("save-temps", cl::desc("Keep temporary files"), |
| 52 | cl::init(SaveTempsEnum::Unset), |
| 53 | cl::values(clEnumValN(SaveTempsEnum::Obj, "obj", |
| 54 | "Save files in the directory specified with -o"), |
| 55 | clEnumValN(SaveTempsEnum::Cwd, "cwd", |
| 56 | "Use current working directory"), |
| 57 | clEnumValN(SaveTempsEnum::Obj, "", "Same as 'cwd'"), |
| 58 | clEnumValEnd), |
Sanjiv Gupta | 2f8ca29 | 2009-07-06 10:34:10 +0000 | [diff] [blame] | 59 | cl::ValueOptional); |
Mikhail Glushenkov | 03b6d4e | 2010-08-20 11:24:44 +0000 | [diff] [blame] | 60 | |
| 61 | } // End namespace llvmc. |