[Mono-devel-list] Architecture-specifiic requirements & use of Mono runtime
Iain McCoy
iain at mccoy.id.au
Fri Jun 25 05:04:38 EDT 2004
On Fri, 2004-06-25 at 16:19, Arterial: Bob Moore wrote:
> Hi,
>
> I'm confused about descriptions of how the JIT compiler produces native
> (architecture-specific) machine code (via the arch/codegen-xxx.h and
> mini/mini-xxx.c files, among others) and what this means for the mcs
> compiler which I thought produced non-platform-specific CIL code.
>
> I've seen HelloWorld examples where a HelloWorld.cs is compiled via mcs
> and then run as "mono HelloWorld.exe".
>
> On the Windows platform, using the Beta2 package mono-Beta2-win32-1.exe,
> the output from "mcs HelloWorls.cs" seems to be a native machine
> executable that I can run without passing to the mono runtime as
> described above.
>
> Are there two different modes of operation for mcs - 1). Compiling to a
> CIL level that is then interpreted by the mono runtime, and 2).
> Compiling to a native machine executable that doesn't then require
> mono.exe?
>
Nope. There is no mode 2. I suspect the reason you observe this on
windows is that you have the .net runtime installed, and when you run
HelloWorld.exe the Microsoft CLR kicks in and handles the executable.
There's a ahead-of-time compilation, which microsoft do with the ngen
utility and mono does with the --aot switch to the runtime, which is a
way of getting native code for a .net executable and thus not needing to
hit the JIT. However, in this case you *still* need a runtime installed
for the garbage collection and the various class libraries.
Does that answer your questions?
--
Iain McCoy <iain at mccoy.id.au>
More information about the Mono-devel-list
mailing list