blob: 126346f68dadf7279724fbcce62c318109b9bcaa [file] [log] [blame]
Mikhail Glushenkov95c1f5b2009-06-29 03:09:15 +00001//===--- 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 Glushenkovcc4f8bc2009-07-04 03:55:25 +000015
16#ifdef ENABLE_LLVMC_DYNAMIC_PLUGINS
Mikhail Glushenkov95c1f5b2009-06-29 03:09:15 +000017#include "llvm/Support/PluginLoader.h"
Mikhail Glushenkovcc4f8bc2009-07-04 03:55:25 +000018#endif
Mikhail Glushenkov95c1f5b2009-06-29 03:09:15 +000019
20namespace cl = llvm::cl;
21
22// External linkage here is intentional.
23
24cl::list<std::string> InputFilenames(cl::Positional, cl::desc("<input file>"),
25 cl::ZeroOrMore);
26cl::opt<std::string> OutputFilename("o", cl::desc("Output file name"),
27 cl::value_desc("file"), cl::Prefix);
28cl::list<std::string> Languages("x",
29 cl::desc("Specify the language of the following input files"),
30 cl::ZeroOrMore);
31cl::opt<bool> DryRun("dry-run",
32 cl::desc("Only pretend to run commands"));
33cl::opt<bool> VerboseMode("v",
34 cl::desc("Enable verbose mode"));
35
36cl::opt<bool> CheckGraph("check-graph",
37 cl::desc("Check the compilation graph for errors"),
38 cl::Hidden);
39cl::opt<bool> WriteGraph("write-graph",
40 cl::desc("Write compilation-graph.dot file"),
41 cl::Hidden);
42cl::opt<bool> ViewGraph("view-graph",
43 cl::desc("Show compilation graph in GhostView"),
44 cl::Hidden);
45
46cl::opt<SaveTempsEnum::Values> SaveTemps
47("save-temps", cl::desc("Keep temporary files"),
48 cl::init(SaveTempsEnum::Unset),
49 cl::values(clEnumValN(SaveTempsEnum::Obj, "obj",
50 "Save files in the directory specified with -o"),
51 clEnumValN(SaveTempsEnum::Cwd, "cwd",
52 "Use current working directory"),
53 clEnumValN(SaveTempsEnum::Obj, "", "Same as 'cwd'"),
54 clEnumValEnd),
Sanjiv Gupta505996f2009-07-06 10:18:37 +000055 //cl::ValueOptional);
56 cl::Hidden);