[Moonlight-list] Minimal mono/mcs

Rolf Bjarne Kvinge rolflists at ya.com
Thu Jan 21 09:21:25 EST 2010


Hi,

 

Here are my current patches for building a minimal mono/mcs only for
moonlight. The resulting mono/mcs is only useful for moonlight, so when
configuring mono -with-moonlight is disabled by default (which shouldn't be
a problem - moon's autogen.sh runs this automatically). This is against mono
trunk.

 

.         All modules (mono, mcs, moon, mono-basic) needs to be checked out
next to each other (this means that the -with-mcspath configure option has
been removed). moon's autogen.sh runs mono's too (the reason for requiring
mono/mcs to be next to moon - easier to find for moon's autogen.sh).

.         The configure options passed to mono are: "--with-moonlight=yes
--enable-minimal=aot,com,interpreter --with-ikvm-native=no
--with-mcs-docs=no --disable-nls":

o   --enable-minimal: has what I figured we could do without, there might be
more.

o   --with-ikvm-native=no: why is this even enabled by default?

o   --with-mcs-docs=no: 

o   --disable-nls: not sure about this one, it just sounded like something
we could skip. 

.         A #define MOONLIGHT  has been added to mono, so we can have
moonlight-specific native code. 

.         A system mono is still required (used to run our tools as well as
gmcs - only smcs is run using moonlight's mono).

.         I got down to building 3 profiles in mcs/class: basic,
net_2_1_bootstrap, net_2_1_raw. There was one little problem though: we
require cecil, the tuner and the linker, which needs to be built too. Cecil
can't be built in the 2.1 profile (it uses  1.0 api which isn't available in
2.1), so that left only the basic profile. Since I didn't want to mess too
much with mcs' makefiles, those  assemblies are built from moon/class
("$(MAKE) -C <assembly src dir> PROFILE=basic" for each of them).

.         I have been a bit in doubt about how to have fewer SUBDIRS entries
in mono/Makefile.am and mono/mono/Makefile.am - the current conditional
solution gets ugly since apparently automake doesn't support 'elseif' and
there already is a conditional in mono/mono/Makefile.am. The other solution
is to have the subdir conditionally defined (like interpreter_dir in
mono/mono/Makefile.am), I like this method better, though more changes (not
necessarily clean since some parts would have to be reordered, ) are
required in mono's configure.in

.         I also made libmono link statically, the problem with this is that
we'll need a separate desktop libmoon, since it needs to use the desktop
mono. Not sure if this is something to pursue.

 

A clean build of mono/mcs/moon/mono-basic (git clean -xfd executed in those
directories first) now completes in 8:48 on my machine (with ccache
installed) - (as a curiosity 3:19 of that is spent inside moon's autogen.sh,
which also execute mono/autogen.sh, mono/libgc/autogen.sh,
moon/pixman/autogen.sh and moon/cairo/autogen.sh.).

 

moon.patch is here: http://monobin.com/__m5eb373f3
<http://monobin.com/__m5eb373f3%20> since it passed the list's size limit.

 

Rolf

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/moonlight-list/attachments/20100121/e7e1459d/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mcs.patch
Type: application/octet-stream
Size: 4514 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/moonlight-list/attachments/20100121/e7e1459d/attachment-0002.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mono.patch
Type: application/octet-stream
Size: 7733 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/moonlight-list/attachments/20100121/e7e1459d/attachment-0003.obj 


More information about the Moonlight-list mailing list