[llvm-commits] [PATCH] Enable MCJIT on cygming

Kaylor, Andrew andrew.kaylor at intel.com
Thu Oct 4 14:41:56 PDT 2012


I like option 1, mostly because that's the way it used to be.  Without knowing why the code to emit the dependency on main is there, I wouldn't want to eliminate it.  

Then again, I'm not sure why the '__main' intercept wasn't brought over from MCJIT/Intercept.cpp when the memory manager was moved into lli.  Perhaps it was just because Cygwin wasn't supported.

-Andy

-----Original Message-----
From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of NAKAMURA Takumi
Sent: Wednesday, October 03, 2012 10:29 PM
To: Anton Korobeynikov
Cc: llvm-commits
Subject: [llvm-commits] [PATCH] Enable MCJIT on cygming

LLIMCJITMemoryManager does not suppress __main.
On cygwin-1.7, multiple invocation of __main would call global ctors also from JIT context.
(It was similar to http://llvm.org/bugs/show_bug.cgi?id=3897 )

I have a couple of options.

[0001] Like legacy MemoryManager, allocate noop to __main.

[0002] Suppress emitting __main with triple=i686-cygming-elf.
  It could be supposed that Win32-ELF would not be linked to crt.


[0003] Enable MCJIT tests also on cygwin.
  Note, MCJIT has been available apparently on mingw. __main is reentrant on mingw crt. (not on cygwin-1.7)


Which option can I take?

...Takumi




More information about the llvm-commits mailing list