summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-08-30 06:27:32 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-08-30 06:27:32 +0000
commit7c14fd152e27aab095d0fe8471903d90c693f36e (patch)
treeec8d83239da0509bc2c3edaba1cd09f89e081df6 /tools
parentb993feb53c2c46b1bab65f486598d20f220b3daf (diff)
downloadllvm-7c14fd152e27aab095d0fe8471903d90c693f36e.tar.gz
llvm-7c14fd152e27aab095d0fe8471903d90c693f36e.tar.bz2
llvm-7c14fd152e27aab095d0fe8471903d90c693f36e.tar.xz
Pass lists of -I and -D options through to the Compiler Driver.
Handle -g and -Wxxx for GCC compatibility git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16115 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/llvmc/llvmc.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/llvmc/llvmc.cpp b/tools/llvmc/llvmc.cpp
index 0f8662382c..8dab301790 100644
--- a/tools/llvmc/llvmc.cpp
+++ b/tools/llvmc/llvmc.cpp
@@ -100,6 +100,14 @@ cl::list<std::string> LibPaths("L", cl::Prefix,
cl::list<std::string> Libraries("l", cl::Prefix,
cl::desc("Specify libraries to link to"), cl::value_desc("library prefix"));
+cl::list<std::string> Includes("I", cl::Prefix,
+ cl::desc("Specify location to search for included source"),
+ cl::value_desc("include directory"));
+
+cl::list<std::string> Defines("D", cl::Prefix,
+ cl::desc("Specify a symbol to define for source configuration"),
+ cl::value_desc("symbol definition"));
+
//===------------------------------------------------------------------------===
//=== OUTPUT OPTIONS
@@ -117,6 +125,9 @@ cl::opt<std::string> OutputMachine("m", cl::Prefix,
cl::opt<bool> Native("native", cl::init(false),
cl::desc("Generative native object and executables instead of bytecode"));
+cl::opt<bool> DebugOutput("g", cl::init(false),
+ cl::desc("Generate objects that include debug symbols"));
+
//===------------------------------------------------------------------------===
//=== INFORMATION OPTIONS
//===------------------------------------------------------------------------===
@@ -145,6 +156,10 @@ cl::opt<bool> TimeActions("time-actions", cl::Optional, cl::init(false),
cl::opt<bool> ShowStats("stats", cl::Optional, cl::init(false),
cl::desc("Print statistics accumulated during optimization"));
+cl::list<std::string> Warnings("W", cl::Prefix,
+ cl::desc("Provide warnings for additional classes of errors"),
+ cl::value_desc("warning category"));
+
//===------------------------------------------------------------------------===
//=== ADVANCED OPTIONS
//===------------------------------------------------------------------------===
@@ -255,6 +270,8 @@ int main(int argc, char **argv) {
CD->setFinalPhase(FinalPhase);
CD->setOptimization(OptLevel);
CD->setOutputMachine(OutputMachine);
+ CD->setIncludePaths(Includes);
+ CD->setSymbolDefines(Defines);
CD->setLibraryPaths(LibPaths);
// Provide additional tool arguments