diff options
| author | Mikhail Glushenkov <foldr@codedgers.com> | 2009-06-29 03:09:15 +0000 |
|---|---|---|
| committer | Mikhail Glushenkov <foldr@codedgers.com> | 2009-06-29 03:09:15 +0000 |
| commit | 72f3f7eb564fdb910a9068d47a00ddc70ba6f61d (patch) | |
| tree | a1de44d525ed8542e7132b0bfc1f22d56915e1e7 /llvm/lib/CompilerDriver/BuiltinOptions.cpp | |
| parent | 3a09c8bd5eae1d286119b0d08c1da8eb1ed40e79 (diff) | |
| download | llvm-72f3f7eb564fdb910a9068d47a00ddc70ba6f61d.zip llvm-72f3f7eb564fdb910a9068d47a00ddc70ba6f61d.tar.gz llvm-72f3f7eb564fdb910a9068d47a00ddc70ba6f61d.tar.bz2 | |
Make dynamic LLVMC plugins work on Windows (finally!).
Implemented by making lib/CompilerDriver a shared library that holds all the
global static data (CommandLine options, plugin registry) that we unfortunately
have to live with.
llvm-svn: 74417
Diffstat (limited to 'llvm/lib/CompilerDriver/BuiltinOptions.cpp')
| -rw-r--r-- | llvm/lib/CompilerDriver/BuiltinOptions.cpp | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/llvm/lib/CompilerDriver/BuiltinOptions.cpp b/llvm/lib/CompilerDriver/BuiltinOptions.cpp new file mode 100644 index 0000000..c8b7682 --- /dev/null +++ b/llvm/lib/CompilerDriver/BuiltinOptions.cpp @@ -0,0 +1,52 @@ +//===--- BuiltinOptions.cpp - The LLVM Compiler Driver ----------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open +// Source License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// Definitions of all global command-line option variables. +// +//===----------------------------------------------------------------------===// + +#include "llvm/CompilerDriver/BuiltinOptions.h" +#include "llvm/Support/PluginLoader.h" + +namespace cl = llvm::cl; + +// External linkage here is intentional. + +cl::list<std::string> InputFilenames(cl::Positional, cl::desc("<input file>"), + cl::ZeroOrMore); +cl::opt<std::string> OutputFilename("o", cl::desc("Output file name"), + cl::value_desc("file"), cl::Prefix); +cl::list<std::string> Languages("x", + cl::desc("Specify the language of the following input files"), + cl::ZeroOrMore); +cl::opt<bool> DryRun("dry-run", + cl::desc("Only pretend to run commands")); +cl::opt<bool> VerboseMode("v", + cl::desc("Enable verbose mode")); + +cl::opt<bool> CheckGraph("check-graph", + cl::desc("Check the compilation graph for errors"), + cl::Hidden); +cl::opt<bool> WriteGraph("write-graph", + cl::desc("Write compilation-graph.dot file"), + cl::Hidden); +cl::opt<bool> ViewGraph("view-graph", + cl::desc("Show compilation graph in GhostView"), + cl::Hidden); + +cl::opt<SaveTempsEnum::Values> SaveTemps +("save-temps", cl::desc("Keep temporary files"), + cl::init(SaveTempsEnum::Unset), + cl::values(clEnumValN(SaveTempsEnum::Obj, "obj", + "Save files in the directory specified with -o"), + clEnumValN(SaveTempsEnum::Cwd, "cwd", + "Use current working directory"), + clEnumValN(SaveTempsEnum::Obj, "", "Same as 'cwd'"), + clEnumValEnd), + cl::ValueOptional); |
