[PATCH] D66754: Use default target triple, not process triple when unit testing MCJIT

Sergej Jaskiewicz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 26 10:29:44 PDT 2019


broadwaylamb created this revision.
broadwaylamb added reviewers: lhames, andrew.w.kaylor.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

sys::getProcessTriple() doesn't play well with LLVM built for cross-compilation.

I'm not sure whether this is the right solution, but to me it makes more sense, besides, it works on my machine™®


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D66754

Files:
  llvm/unittests/ExecutionEngine/MCJIT/MCJITTestAPICommon.h


Index: llvm/unittests/ExecutionEngine/MCJIT/MCJITTestAPICommon.h
===================================================================
--- llvm/unittests/ExecutionEngine/MCJIT/MCJITTestAPICommon.h
+++ llvm/unittests/ExecutionEngine/MCJIT/MCJITTestAPICommon.h
@@ -36,7 +36,7 @@
 class MCJITTestAPICommon {
 protected:
   MCJITTestAPICommon()
-    : HostTriple(sys::getProcessTriple())
+    : HostTriple(sys::getDefaultTargetTriple())
   {
     InitializeNativeTarget();
     InitializeNativeTargetAsmPrinter();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66754.217193.patch
Type: text/x-patch
Size: 508 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190826/0a9b0901/attachment.bin>


More information about the llvm-commits mailing list