Joshua Klontz
2013-Dec-02 21:17 UTC
[LLVMdev] MCJIT + Windows = Incompatible object format
Is the MCJIT infrastructure supported on Windows? I'm getting an "LLVM ERROR: Incompatible object format!" when running my project with both VS 2013 and Mingw_w64 (GCC 4.8.2). Looks like this issue has been brought up before [1,2] and the answer is "almost". Any help would be greatly appreciated. v/r, Josh [1] http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-January/046670.html [2] http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-August/052522.html -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131202/f6699d2e/attachment.html>
Hi Josh, JIT/MCJIT works on Windows 32 bit (maybe 64 also) with ELF object file format: -target i686-pc-mingw32-elf Yaron 2013/12/2 Joshua Klontz <josh.klontz at gmail.com>> Is the MCJIT infrastructure supported on Windows? I'm getting an "LLVM > ERROR: Incompatible object format!" when running my project with both VS > 2013 and Mingw_w64 (GCC 4.8.2). Looks like this issue has been brought up > before [1,2] and the answer is "almost". Any help would be greatly > appreciated. > > v/r, > Josh > > [1] http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-January/046670.html > [2] http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-August/052522.html > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131203/2e3a3f1b/attachment.html>
Kaylor, Andrew
2013-Dec-03 00:27 UTC
[LLVMdev] MCJIT + Windows = Incompatible object format
As Yaron said, you need to add "-elf" to the end of your target triple to get MCJIT to generate ELF object in memory on Windows. This should work with 32- or 64-bit targets. -Andy From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Joshua Klontz Sent: Monday, December 02, 2013 1:18 PM To: Dev Subject: [LLVMdev] MCJIT + Windows = Incompatible object format Is the MCJIT infrastructure supported on Windows? I'm getting an "LLVM ERROR: Incompatible object format!" when running my project with both VS 2013 and Mingw_w64 (GCC 4.8.2). Looks like this issue has been brought up before [1,2] and the answer is "almost". Any help would be greatly appreciated. v/r, Josh [1] http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-January/046670.html [2] http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-August/052522.html -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131203/5864afd8/attachment.html>
Joshua Klontz
2013-Dec-03 14:49 UTC
[LLVMdev] MCJIT + Windows = Incompatible object format
Bingo, thanks! Confirmed it works for both 32- and 64-bit targets. Should `sys::getProcessTriple()` be updated with this change? According to the documentation: /// getProcessTriple() - Return an appropriate target triple for generating /// code to be loaded into the current process, e.g. when using the JIT. I had to "-elf" to the result of this function for JIT to work on Windows. v/r, Josh On Mon, Dec 2, 2013 at 7:27 PM, Kaylor, Andrew <andrew.kaylor at intel.com>wrote:> As Yaron said, you need to add “-elf” to the end of your target triple > to get MCJIT to generate ELF object in memory on Windows. This should work > with 32- or 64-bit targets. > > > > -Andy > > > > > > *From:* llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] *On > Behalf Of *Joshua Klontz > *Sent:* Monday, December 02, 2013 1:18 PM > *To:* Dev > *Subject:* [LLVMdev] MCJIT + Windows = Incompatible object format > > > > Is the MCJIT infrastructure supported on Windows? I'm getting an "LLVM > ERROR: Incompatible object format!" when running my project with both VS > 2013 and Mingw_w64 (GCC 4.8.2). Looks like this issue has been brought up > before [1,2] and the answer is "almost". Any help would be greatly > appreciated. > > > > v/r, > > Josh > > > > [1] http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-January/046670.html > > [2] http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-August/052522.html >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131203/eff090d6/attachment.html>