[Mono-list] effect of -nostdlib option

Miguel de Icaza miguel@ximian.com
04 Mar 2003 00:21:16 -0500


> What you're actually saying is that it's not possible to use Mcs.exe on
> Windows to compile an assembly using the Mono system assemblies, without
> running it using the Mono runtime.
> I was hoping I could use the -nostblib option to force Mcs not to load the
> MS.NET corlib.  But I guess it's not possible, right ?

In the MCS compiler -nostdlib turns on a special mode in which the
compiler is setup for self-hosting.  Since the compiler is written in C#
and uses System.Reflection as its core type repository, there a number
of assumptions in the code about the meaning of this flag.

In reality we should three states:

	* Normal state.

	* Do not load default libraries, I will provide them in the
	  command line

	* Do not load default libraries, and setup for corlib bootstrap

Today -nostdlib stands for (3), while the behavior you want is (2).  It
is not very hard to fix, but it is a very low priority for me.  If
someone wants to do it, feel free to send a patch.