// FIXME: these lines had better be platform independent.
if (Path.DirectorySeparatorChar == '\\') {
mcs.StartInfo.FileName = MonoToolsLocator.Mono;
- mcs.StartInfo.Arguments = "\"" + MonoToolsLocator.CSharpCompiler + "\" ";
+ mcs.StartInfo.Arguments = "\"" + MonoToolsLocator.McsCSharpCompiler + "\" ";
} else {
- mcs.StartInfo.FileName = MonoToolsLocator.CSharpCompiler;
+ mcs.StartInfo.FileName = MonoToolsLocator.McsCSharpCompiler;
}
mcs.StartInfo.Arguments += BuildArgs (options, fileNames, ProviderOptions);
mcs.StartInfo.UseShellExecute=false;
mcs.StartInfo.RedirectStandardOutput=true;
mcs.StartInfo.RedirectStandardError=true;
- mcs.OutputDataReceived += new DataReceivedEventHandler (McsStderrDataReceived);
+ mcs.ErrorDataReceived += new DataReceivedEventHandler (McsStderrDataReceived);
// Use same text decoder as mcs and not user set values in Console
mcs.StartInfo.StandardOutputEncoding =
options.Win32Resource);
if (options.IncludeDebugInformation)
- args.Append("/debug:portable /optimize- ");
+ args.Append("/debug+ /optimize- ");
else
args.Append("/debug- /optimize+ ");
args.Append ("/noconfig ");
- args.Append ("/nologo ");
-
- // args.Append (" -- ");
+ args.Append (" -- ");
foreach (string source in fileNames)
args.AppendFormat("\"{0}\" ",source);
return args.ToString();
static class MonoToolsLocator
{
public static readonly string Mono;
- public static readonly string CSharpCompiler;
+ public static readonly string McsCSharpCompiler;
public static readonly string VBCompiler;
public static readonly string AssemblyLinker;
//if (!File.Exists (Mono))
// throw new FileNotFoundException ("Windows mono path not found: " + Mono);
- CSharpCompiler = Path.Combine (GacPath, "4.5", "csc.exe");
- if (!File.Exists (CSharpCompiler)) {
+ McsCSharpCompiler = Path.Combine (GacPath, "4.5", "mcs.exe");
+ if (!File.Exists (McsCSharpCompiler)) {
// Starting from mono\mcs\class
- CSharpCompiler = Path.Combine (Path.GetDirectoryName (GacPath), "..", "..", "external", "roslyn-binaries",
- "Microsoft.Net.Compilers", "Microsoft.Net.Compilers.1.3.2", "tools", "csc.exe");
+ McsCSharpCompiler = Path.Combine (Path.GetDirectoryName (GacPath), "lib", "net_4_x", "mcs.exe");
}
//if (!File.Exists (CSharpCompiler))
Mono = "mono";
var mscorlibPath = new Uri (typeof (object).Assembly.CodeBase).LocalPath;
- CSharpCompiler = Path.GetFullPath (Path.Combine (mscorlibPath, "..", "..", "..", "..", "bin", "csc"));
- if (!File.Exists (CSharpCompiler))
- CSharpCompiler = "csc";
+ McsCSharpCompiler = Path.GetFullPath (Path.Combine (mscorlibPath, "..", "..", "..", "..", "bin", "mcs"));
+ if (!File.Exists (McsCSharpCompiler))
+ McsCSharpCompiler = "mcs";
VBCompiler = Path.GetFullPath (Path.Combine (mscorlibPath, "..", "..", "..", "..", "bin", "vbnc"));
if (!File.Exists (VBCompiler))
if INSTALL_4_x
build_profiles += binary_reference_assemblies net_4_x xbuild_12 xbuild_14
-al_profile = net_4_x
+net_profile = net_4_x
endif
if INSTALL_MONODROID
endif BUILD_MCS
-TEST_SUPPORT_FILES = $(tmpinst)/bin/mono $(tmpinst)/bin/ilasm $(tmpinst)/bin/csc $(tmpinst)/bin/al
+TEST_SUPPORT_FILES = $(tmpinst)/bin/mono $(tmpinst)/bin/ilasm $(tmpinst)/bin/csc $(tmpinst)/bin/mcs $(tmpinst)/bin/al
mcs-do-test-profiles:
cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='$(test_profiles)' test-profiles
echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$(CSC)"'" "$$@"' >> $@ ; \
chmod +x $@
+$(tmpinst)/bin/mcs: $(tmpinst)/bin/mono Makefile
+ echo '#! /bin/sh' > $@ ; \
+ r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
+ echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/$(net_profile)/mcs.exe"'" "$$@"' >> $@ ; \
+ chmod +x $@
+
$(tmpinst)/bin/ilasm: $(tmpinst)/bin/mono Makefile
echo '#! /bin/sh' > $@ ; \
r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
$(tmpinst)/bin/al: $(tmpinst)/bin/mono Makefile
echo '#! /bin/sh' > $@ ; \
r=`pwd`; m=`cd $(mcs_topdir) && pwd`; \
- echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/$(al_profile)/al.exe"'" "$$@"' >> $@ ; \
+ echo 'exec "'"$$r/$(tmpinst)/bin/mono"'" "'"$$m/class/lib/$(net_profile)/al.exe"'" "$$@"' >> $@ ; \
chmod +x $@
test-support-files: $(TEST_SUPPORT_FILES)