[PATCH] Fix for Bug 5053

Swaroop Sridhar Swaroop.Sridhar at microsoft.com
Wed Nov 12 14:55:29 PST 2014


Thanks Reid, using -mtriple=i686-pc-windows-msvc-elf helped.
I verified that the same failure repros on Windows when using MCJit, and that the patch fixes it.

Swaroop.

From: Reid Kleckner [mailto:rnk at google.com]
Sent: Sunday, October 26, 2014 4:18 PM
To: Swaroop Sridhar
Cc: bigcheesegs at gmail.com; anton at korobeynikov.info; llvm-commits at cs.uiuc.edu
Subject: Re: [PATCH] Fix for Bug 5053

It is supported, but in a very roundabout way, unfortunately. You have to use a target triple like: i686-pc-windows-msvc-elf or something ridiculous like that. Try adding '-mtriple=i686-pc-windows-msvc-elf'. MCJIT has a lot of loader-like functionality, but it's only implemented for MachO and ELF, not COFF, so you have to emit and "load" ELF files in memory to use MCJIT on Windows.

On Fri, Oct 24, 2014 at 4:30 PM, Swaroop Sridhar <Swaroop.Sridhar at microsoft.com<mailto:Swaroop.Sridhar at microsoft.com>> wrote:
Hi Lang,

Is the MCJit supported on Windows?

I tried the following using lli MCJIT (on the development branch of LLVM), but LLI failed with the following error:

Debug\bin\lli.exe  llvm\test\ExecutionEngine\hello.ll
LLVM ERROR: Incompatible object format!
Stack dump:
0.      Program arguments: Debug\bin\lli.exe D:\enlist\JIT\llvm\test\ExecutionEngine\hello.ll


Thanks,
Swaroop.

-----Original Message-----
From: Lang Hames [mailto:lhames at gmail.com<mailto:lhames at gmail.com>]
Sent: Monday, October 13, 2014 7:34 PM
To: Swaroop Sridhar; bigcheesegs at gmail.com<mailto:bigcheesegs at gmail.com>; anton at korobeynikov.info<mailto:anton at korobeynikov.info>; rnk at google.com<mailto:rnk at google.com>
Cc: lhames at gmail.com<mailto:lhames at gmail.com>; llvm-commits at cs.uiuc.edu<mailto:llvm-commits at cs.uiuc.edu>
Subject: Re: [PATCH] Fix for Bug 5053
Hi Swaroop,

Copied from the bug report:

The old JIT is deprecated in 3.5, and has been removed entirely on the development branch of LLVM. Could you try this with MCJIT and see if your problem reproduces there?

Just run 'lli -use-mcjit testcase.ll' on 3.5, or simply 'lli testcase.ll' on the development branch where MCJIT is the default.

Cheers,
Lang.

http://reviews.llvm.org/D5387


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141112/9806ec3c/attachment.html>


More information about the llvm-commits mailing list