aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2012-04-18 08:34:12 +0000
committerNick Lewycky <nicholas@mxc.ca>2012-04-18 08:34:12 +0000
commit9a1484165cd7cc3b95f5f65f845257c44f55a5b3 (patch)
treea8fa1327a1d29fabdda2a3a1f360763a21cbebee
parentecc754de8eaaefde8af71c4fb6cdb21e6a0f0246 (diff)
Move the JIT flags from llc to lli. These flags showed up as part of moving
backend flags in TargetOptions.h into their own class in r145714. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154993 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--tools/llc/llc.cpp26
-rw-r--r--tools/lli/lli.cpp28
2 files changed, 28 insertions, 26 deletions
diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp
index 9e30ac198b..ceff8a6c8c 100644
--- a/tools/llc/llc.cpp
+++ b/tools/llc/llc.cpp
@@ -210,29 +210,6 @@ DontPlaceZerosInBSS("nozero-initialized-in-bss",
cl::init(false));
static cl::opt<bool>
-EnableJITExceptionHandling("jit-enable-eh",
- cl::desc("Emit exception handling information"),
- cl::init(false));
-
-// In debug builds, make this default to true.
-#ifdef NDEBUG
-#define EMIT_DEBUG false
-#else
-#define EMIT_DEBUG true
-#endif
-static cl::opt<bool>
-EmitJitDebugInfo("jit-emit-debug",
- cl::desc("Emit debug information to debugger"),
- cl::init(EMIT_DEBUG));
-#undef EMIT_DEBUG
-
-static cl::opt<bool>
-EmitJitDebugInfoToDisk("jit-emit-debug-to-disk",
- cl::Hidden,
- cl::desc("Emit debug info objfiles to disk"),
- cl::init(false));
-
-static cl::opt<bool>
EnableGuaranteedTailCallOpt("tailcallopt",
cl::desc("Turn fastcc calls into tail calls by (potentially) changing ABI."),
cl::init(false));
@@ -463,9 +440,6 @@ int main(int argc, char **argv) {
if (FloatABIForCalls != FloatABI::Default)
Options.FloatABIType = FloatABIForCalls;
Options.NoZerosInBSS = DontPlaceZerosInBSS;
- Options.JITExceptionHandling = EnableJITExceptionHandling;
- Options.JITEmitDebugInfo = EmitJitDebugInfo;
- Options.JITEmitDebugInfoToDisk = EmitJitDebugInfoToDisk;
Options.GuaranteedTailCallOpt = EnableGuaranteedTailCallOpt;
Options.DisableTailCalls = DisableTailCalls;
Options.StackAlignmentOverride = OverrideStackAlignment;
diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp
index efcc1f5870..2e2bf7d66e 100644
--- a/tools/lli/lli.cpp
+++ b/tools/lli/lli.cpp
@@ -141,6 +141,28 @@ namespace {
"Large code model"),
clEnumValEnd));
+ cl::opt<bool>
+ EnableJITExceptionHandling("jit-enable-eh",
+ cl::desc("Emit exception handling information"),
+ cl::init(false));
+
+ cl::opt<bool>
+// In debug builds, make this default to true.
+#ifdef NDEBUG
+#define EMIT_DEBUG false
+#else
+#define EMIT_DEBUG true
+#endif
+ EmitJitDebugInfo("jit-emit-debug",
+ cl::desc("Emit debug information to debugger"),
+ cl::init(EMIT_DEBUG));
+#undef EMIT_DEBUG
+
+ static cl::opt<bool>
+ EmitJitDebugInfoToDisk("jit-emit-debug-to-disk",
+ cl::Hidden,
+ cl::desc("Emit debug info objfiles to disk"),
+ cl::init(false));
}
static ExecutionEngine *EE = 0;
@@ -229,6 +251,12 @@ int main(int argc, char **argv, char * const *envp) {
}
builder.setOptLevel(OLvl);
+ TargetOptions Options;
+ Options.JITExceptionHandling = EnableJITExceptionHandling;
+ Options.JITEmitDebugInfo = EmitJitDebugInfo;
+ Options.JITEmitDebugInfoToDisk = EmitJitDebugInfoToDisk;
+ builder.setTargetOptions(Options);
+
EE = builder.create();
if (!EE) {
if (!ErrorMsg.empty())