diff options
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_misc.cpp')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index f004c0ae451..87e9f004878 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp @@ -36,6 +36,7 @@ #include <llvm-c/Core.h> #include <llvm-c/ExecutionEngine.h> +#include <llvm/Target/TargetOptions.h> #include <llvm/ExecutionEngine/ExecutionEngine.h> #include <llvm/ExecutionEngine/JITEventListener.h> @@ -119,3 +120,28 @@ lp_register_oprofile_jit_event_listener(LLVMExecutionEngineRef EE) { llvm::unwrap(EE)->RegisterJITEventListener(llvm::createOProfileJITEventListener()); } + + +extern "C" void +lp_set_target_options(void) +{ +#if defined(DEBUG) +#if HAVE_LLVM >= 0x0207 + llvm::JITEmitDebugInfo = true; +#endif +#endif + +#if defined(DEBUG) || defined(PROFILE) + llvm::NoFramePointerElim = true; +#if HAVE_LLVM >= 0x0207 + llvm::NoFramePointerElimNonLeaf = true; +#endif +#endif + + llvm::NoExcessFPPrecision = false; + + /* XXX: Investigate this */ +#if 0 + llvm::UnsafeFPMath = true; +#endif +} |