[build] Enable full mcs boostrap for mcs compiler mode
authorMarek Safar <marek.safar@gmail.com>
Fri, 2 Dec 2016 10:36:26 +0000 (11:36 +0100)
committerMarek Safar <marek.safar@gmail.com>
Fri, 2 Dec 2016 17:08:41 +0000 (18:08 +0100)
mcs/Makefile
mcs/build/profiles/basic.make

index c2f9a1a6097ed99e92d93f91a3640de55346161b..232a4acfbcb3aa59668b263bb9c3ee2307d09a9f 100644 (file)
@@ -4,8 +4,8 @@ SUBDIRS := build jay mcs class nunit24 ilasm tools tests errors docs packages
 
 # Resgen is corlib specific tool
 
-basic_SUBDIRS := build class
-build_SUBDIRS := build jay class class/aot-compiler tools
+basic_SUBDIRS := build jay class
+build_SUBDIRS := build class class/aot-compiler tools
 monodroid_SUBDIRS := build class
 monotouch_SUBDIRS := build class
 monotouch_watch_SUBDIRS := build class
index 6095f4d4a6f49d29776d13a4cf96df8629f975d3..e9904bc396a7b3ef3a856aa4c5b925b5d540c673 100644 (file)
@@ -7,17 +7,23 @@ use_monolite := $(wildcard $(monolite_flag))
 
 MONOLITE_MSCORLIB = $(topdir)/class/lib/monolite/mscorlib.dll
 
-# Bootstrap compiler does not have to be same as production compiler
-INTERNAL_GMCS = $(CSC_LOCATION)
-
 ifdef use_monolite
+ifdef MCS_MODE
+       CSC_LOCATION = $(topdir)/class/lib/monolite/mcs.exe
+endif
+
 PROFILE_RUNTIME = $(with_mono_path_monolite) $(RUNTIME)
+BOOTSTRAP_MCS = $(PROFILE_RUNTIME) $(RUNTIME_FLAGS) $(CSC_LOCATION)
+
 else
 PROFILE_RUNTIME = $(EXTERNAL_RUNTIME)
+ifdef MCS_MODE
+       BOOTSTRAP_MCS = mcs
+else
+       BOOTSTRAP_MCS = $(PROFILE_RUNTIME) $(RUNTIME_FLAGS) $(CSC_LOCATION)
+endif
 endif
 
-INTERNAL_CSC = $(PROFILE_RUNTIME) $(RUNTIME_FLAGS) $(INTERNAL_GMCS)
-BOOTSTRAP_MCS = $(INTERNAL_CSC)
 MCS = $(BOOTSTRAP_MCS)
 
 DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll
@@ -104,7 +110,7 @@ endif
 
 $(PROFILE_EXE): $(topdir)/build/common/basic-profile-check.cs
        $(MAKE) $(MAKE_Q) -C $(topdir)/packages
-       $(INTERNAL_CSC) /warn:0 /noconfig /r:System.dll /r:mscorlib.dll /out:$@ $<
+       $(BOOTSTRAP_MCS) /warn:0 /noconfig /r:System.dll /r:mscorlib.dll /out:$@ $<
 
 $(PROFILE_OUT): $(PROFILE_EXE)
        $(PROFILE_RUNTIME) $< > $@ 2>&1