Version française
Home     About     Download     Resources     Contact us    
Browse thread
Jane Street is hiring (as if you didn't already know)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Alain Frisch <alain@f...>
Subject: Re: [Caml-list] Re: OCaml and kernels
Richard Jones wrote:
> On Wed, Aug 19, 2009 at 09:43:18PM +0900, Alexander Danilov wrote:
>> + out of box support for native executables creation for win32/mingw
> 
> Not sure what you mean here, because I've built Win32 native
> executables from OCaml using both the INRIA-supplied binaries and our
> cross-compiler.  Works perfectly well out of the box.

I guess Alexander means that ocamlopt requires external tools (assembler 
and linker). This can be an issue since masm/link cannot be 
redistributed (and cannot be found in a standalone package, not embedded 
in a full Visual Studio installation) and some people are reluctant to 
redistribute or install gas/ld (for whatever reason).

FWIW, we faced this problem at LexiFi, so we developed a direct COFF/x86 
backend for ocamlopt (just a straightforward replacement for emit_nt.mlp 
that produces x86 opcodes and put them in a .obj file). This avoids the 
need for an external assembler. We also extended flexlink with a 
stand-alone mode in order to produce DLLs from COFF files without 
relying on an external linker. This is enough to build .cmxs files from 
OCaml code, and this was enough for our needs. To produce an executable, 
more work would be needed on flexlink.


-- Alain