summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
diff options
context:
space:
mode:
authorVinson Lee <vlee@vmware.com>2011-12-12 17:54:54 -0800
committerVinson Lee <vlee@vmware.com>2011-12-16 21:22:39 -0800
commit95aa0e5d84a4f46f2f0809b26f5899b8e39f5afc (patch)
tree5fd1533fc1200816691b008d2521f4a1e3f1e4e9 /src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
parent5d32b00db97a140a63b62f2b4945e1a50c7e0d64 (diff)
downloadexternal_mesa3d-95aa0e5d84a4f46f2f0809b26f5899b8e39f5afc.zip
external_mesa3d-95aa0e5d84a4f46f2f0809b26f5899b8e39f5afc.tar.gz
external_mesa3d-95aa0e5d84a4f46f2f0809b26f5899b8e39f5afc.tar.bz2
gallivm: Fix build with llvm-3.1svn.
llvm-3.1svn r145714 moved global variables into a new TargetOptions class. TargetMachine constructor now needs a TargetOptions object as well. Signed-off-by: Vinson Lee <vlee@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_debug.cpp')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_debug.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
index 62825a2..a50a51d 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
@@ -250,7 +250,19 @@ lp_disassemble(const void* func)
return;
}
-#if HAVE_LLVM >= 0x0300
+#if HAVE_LLVM >= 0x0301
+ TargetOptions options;
+#if defined(DEBUG)
+ options.JITEmitDebugInfo = true;
+#endif
+#if defined(PIPE_ARCH_X86)
+ options.StackAlignmentOverride = 4;
+#endif
+#if defined(DEBUG) || defined(PROFILE)
+ options.NoFramePointerElim = true;
+#endif
+ TargetMachine *TM = T->createTargetMachine(Triple, sys::getHostCPUName(), "", options);
+#elif HAVE_LLVM == 0x0300
TargetMachine *TM = T->createTargetMachine(Triple, sys::getHostCPUName(), "");
#else
TargetMachine *TM = T->createTargetMachine(Triple, "");