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:
authorMarek Safar <marek.safar@gmail.com>2016-12-12 17:48:36 +0300
committerMarek Safar <marek.safar@gmail.com>2016-12-12 17:48:36 +0300
commitcfccb41b25a996b9d6ab0c2d9c24f1b32c6fed63 (patch)
treed13eecb12a3977a4797235e18203aace9c161fab
parent56f1d451006c9194af19b7a5bf9c37d65ed8051c (diff)
[System] Always use mcs as CodeDOM backend compiler
-rw-r--r--mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs12
-rwxr-xr-xmcs/class/System/System/MonoToolsLocator.cs15
-rw-r--r--runtime/Makefile.am12
3 files changed, 21 insertions, 18 deletions
diff --git a/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs b/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs
index 3d4e7970ea1..26dd47b4c95 100644
--- a/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs
+++ b/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs
@@ -133,9 +133,9 @@ namespace Mono.CSharp
// 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);
@@ -169,7 +169,7 @@ namespace Mono.CSharp
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 =
@@ -268,7 +268,7 @@ namespace Mono.CSharp
options.Win32Resource);
if (options.IncludeDebugInformation)
- args.Append("/debug:portable /optimize- ");
+ args.Append("/debug+ /optimize- ");
else
args.Append("/debug- /optimize+ ");
@@ -327,9 +327,7 @@ namespace Mono.CSharp
args.Append ("/noconfig ");
- args.Append ("/nologo ");
-
- // args.Append (" -- ");
+ args.Append (" -- ");
foreach (string source in fileNames)
args.AppendFormat("\"{0}\" ",source);
return args.ToString();
diff --git a/mcs/class/System/System/MonoToolsLocator.cs b/mcs/class/System/System/MonoToolsLocator.cs
index 8ac5c54b8a0..7c1e9ab7911 100755
--- a/mcs/class/System/System/MonoToolsLocator.cs
+++ b/mcs/class/System/System/MonoToolsLocator.cs
@@ -11,7 +11,7 @@ namespace System {
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;
@@ -46,11 +46,10 @@ namespace System {
//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))
@@ -70,9 +69,9 @@ namespace System {
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))
diff --git a/runtime/Makefile.am b/runtime/Makefile.am
index 7af06ebeee5..5224c91837f 100644
--- a/runtime/Makefile.am
+++ b/runtime/Makefile.am
@@ -29,7 +29,7 @@ build_profiles =
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
@@ -92,7 +92,7 @@ clean-local:
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
@@ -187,6 +187,12 @@ $(tmpinst)/bin/csc: $(tmpinst)/bin/mono Makefile
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`; \
@@ -196,7 +202,7 @@ $(tmpinst)/bin/ilasm: $(tmpinst)/bin/mono Makefile
$(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)