[Mesa-dev] [PATCH 2/9] gallivm: Use LLVMSetTarget.

Jose Fonseca jfonseca at vmware.com
Mon Apr 18 09:14:29 UTC 2016


Instead of LLVM C++ interfaces.
---
 src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
index c1e262b..37e2f08 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
@@ -519,9 +519,11 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
        /*
         * MCJIT works on Windows, but currently only through ELF object format.
         */
-       std::string targetTriple = llvm::sys::getProcessTriple();
-       targetTriple.append("-elf");
-       unwrap(M)->setTargetTriple(targetTriple);
+#  ifdef _WIN64
+       LLVMSetTarget(M, "x86_64-pc-win32-elf");
+#  else
+       LLVMSetTarget(M, "i686-pc-win32-elf");
+#  endif
 #endif
    }
 
-- 
2.5.0



More information about the mesa-dev mailing list