[cfe-dev] JIT to MSVC?

Ruben Van Boxem vanboxem.ruben at gmail.com
Tue Aug 23 00:39:12 PDT 2011


Op 23 aug. 2011 02:22 schreef "Eli Friedman" <eli.friedman at gmail.com> het
volgende:
>
> On Mon, Aug 22, 2011 at 4:57 PM, Graham Wakefield
> <wakefield at mat.ucsb.edu> wrote:
> > Hi list,
> >
> > I'm having an issue JIT compiling some C++ in an application I'm working
on. JIT is failing with an llvm linker error on symbol _Znwj (the C++ new
operator) on Windows, but works fine on OSX. As far as we can tell, this may
be because the JIT is mangling new for the g++ standard library, but the
host application is built using Visual Studio 2008 (aka VC9) which has a
different mangled name for new.
> >
> > I was wondering if there are any configuration options we can use for
Clang/LLVM to target MSVC runtime (for JITted code),
>
> There is an option to use MSVC-compatible mangling, but it's
> experimental, and you're likely to run into other C++ ABI issues.  I
> wouldn't suggest doing this.
>
> > or if anyone has any suggestions for strategies for embedding libg++
(the application will need to work on non-developer systems, so we can't
rely on the presence of libraries on the system.)
>
> You should be able to link against libstdc++.dll, distribute it with
> your app, and have everything just work (although note that libstdc++
> is LGPL).

I was under the impression that libstdc++ fell under GCC's runtime library
exception, which pretty much means you can use it in any way you see fit
(including statically linked)

Ruben

>
> Note that if you have RTTI and exceptions turned off, and are not
> using standard library headers, you don't really need much besides
> operator new/delete; it would be trivial to write your own
> implementation.
>
> -Eli
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110823/fb077b1c/attachment.html>


More information about the cfe-dev mailing list