From 2c02f34fccee563e22db70cbfb03fb2cc7da30f9 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Wed, 14 May 2014 12:20:14 +0100 Subject: gallivm: Support MCJIT on Windows. It works fine, though it requires using ELF objects. With this change there is nothing preventing us to switch exclusively to MCJIT, everywhere. It's still off though. --- src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/gallium/auxiliary/gallivm/lp_bld_misc.cpp') diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp index d03680fc67d..d1cc9b67b6c 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp @@ -57,6 +57,7 @@ #include #include #include +#include #include #include @@ -452,6 +453,14 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT, if (useMCJIT) { builder.setUseMCJIT(true); +#ifdef _WIN32 + /* + * MCJIT works on Windows, but currently only through ELF object format. + */ + std::string targetTriple = llvm::sys::getProcessTriple(); + targetTriple.append("-elf"); + unwrap(M)->setTargetTriple(targetTriple); +#endif } llvm::SmallVector MAttrs; -- cgit v1.2.3