LLVM API Documentation
00001 //===--- BuiltinOptions.cpp - The LLVM Compiler Driver ----------*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open 00006 // Source License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // Definitions of all global command-line option variables. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #include "llvm/CompilerDriver/BuiltinOptions.h" 00015 00016 #ifdef ENABLE_LLVMC_DYNAMIC_PLUGINS 00017 #include "llvm/Support/PluginLoader.h" 00018 #endif 00019 00020 namespace cl = llvm::cl; 00021 00022 // External linkage here is intentional. 00023 00024 cl::list<std::string> InputFilenames(cl::Positional, cl::desc("<input file>"), 00025 cl::ZeroOrMore); 00026 cl::opt<std::string> OutputFilename("o", cl::desc("Output file name"), 00027 cl::value_desc("file"), cl::Prefix); 00028 cl::opt<std::string> TempDirname("temp-dir", cl::desc("Temp dir name"), 00029 cl::value_desc("<directory>"), cl::Prefix); 00030 cl::list<std::string> Languages("x", 00031 cl::desc("Specify the language of the following input files"), 00032 cl::ZeroOrMore); 00033 cl::opt<bool> DryRun("dry-run", 00034 cl::desc("Only pretend to run commands")); 00035 cl::opt<bool> VerboseMode("v", 00036 cl::desc("Enable verbose mode")); 00037 00038 cl::opt<bool> CheckGraph("check-graph", 00039 cl::desc("Check the compilation graph for errors"), 00040 cl::Hidden); 00041 cl::opt<bool> WriteGraph("write-graph", 00042 cl::desc("Write compilation-graph.dot file"), 00043 cl::Hidden); 00044 cl::opt<bool> ViewGraph("view-graph", 00045 cl::desc("Show compilation graph in GhostView"), 00046 cl::Hidden); 00047 00048 cl::opt<SaveTempsEnum::Values> SaveTemps 00049 ("save-temps", cl::desc("Keep temporary files"), 00050 cl::init(SaveTempsEnum::Unset), 00051 cl::values(clEnumValN(SaveTempsEnum::Obj, "obj", 00052 "Save files in the directory specified with -o"), 00053 clEnumValN(SaveTempsEnum::Cwd, "cwd", 00054 "Use current working directory"), 00055 clEnumValN(SaveTempsEnum::Obj, "", "Same as 'cwd'"), 00056 clEnumValEnd), 00057 cl::ValueOptional);