Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZoltan Varga <vargaz@gmail.com>2010-08-27 22:56:47 +0400
committerZoltan Varga <vargaz@gmail.com>2010-08-27 22:58:08 +0400
commit670d62603498e072daba61d96eebbdd01ae315c0 (patch)
tree0b19c96c89c7eb65ac82416d2bc4b084937ffb4e /mcs/class/aot-compiler
parent58907842f3ab1d23d9046f8467555606270fcddc (diff)
Add a new directory which is used for AOTing the c# compiler before compiling most of the class libs. This cuts the mcs build time by about 30%.
Diffstat (limited to 'mcs/class/aot-compiler')
-rw-r--r--mcs/class/aot-compiler/Makefile35
1 files changed, 35 insertions, 0 deletions
diff --git a/mcs/class/aot-compiler/Makefile b/mcs/class/aot-compiler/Makefile
new file mode 100644
index 00000000000..120f61b8ff7
--- /dev/null
+++ b/mcs/class/aot-compiler/Makefile
@@ -0,0 +1,35 @@
+#
+# This directory is used to AOT the C# compiler to speed up the rest of the class libs build
+# It should be run after the assemblies the compiler depends on have been compiled, since
+# the AOT image has a dependency on the exact assembly versions used to produce it.
+#
+
+thisdir = class/aot-compiler
+
+include ../../build/rules.make
+
+the_libdir = $(topdir)/class/lib/$(PROFILE)/
+
+# The 2.0 profile uses mcs/gmcs.exe instead of lib/net_2_0/gmcs.exe
+ifeq (net_2_0, $(PROFILE))
+mcs_exe = $(topdir)/mcs/gmcs.exe
+else ifeq (net_4_0, $(PROFILE))
+mcs_exe = $(topdir)/class/lib/$(PROFILE)/dmcs.exe
+endif
+
+mcs_aot_image = $(mcs_exe)$(PLATFORM_AOT_SUFFIX)
+
+ifdef PLATFORM_AOT_SUFFIX
+Q_AOT=$(if $(V),,@echo "AOT [$(PROFILE)] $(notdir $(@))";)
+$(mcs_aot_image): $(mcs_exe)
+ $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version --debug $(mcs_exe)
+
+ifeq (net_2_0, $(PROFILE))
+all-local: $(mcs_aot_image)
+endif
+
+ifeq (net_4_0, $(PROFILE))
+all-local: $(mcs_aot_image)
+endif
+
+endif