Imported Upstream version 4.0.0~alpha1

Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
Jo Shields
2015-04-07 09:35:12 +01:00
parent 283343f570
commit 3c1f479b9d
22469 changed files with 2931443 additions and 869343 deletions

View File

@@ -179,34 +179,6 @@ namespace Mono.CSharp
mcsOutput = new StringCollection ();
mcsOutMutex = new Mutex ();
#if !NET_4_0
/*
* !:. KLUDGE WARNING .:!
*
* When running the 2.0 test suite some assemblies will invoke mcs via
* CodeDOM and the new mcs process will find the MONO_PATH variable in its
* environment pointing to the net_2_0 library which will cause the runtime
* to attempt to load the 2.0 corlib into 4.0 process and thus mcs will
* fail. At the same time, we must not touch MONO_PATH when running outside
* the test suite, thus the kludge.
*
* !:. KLUDGE WARNING .:!
*/
if (Environment.GetEnvironmentVariable ("MONO_TESTS_IN_PROGRESS") != null) {
string monoPath = Environment.GetEnvironmentVariable ("MONO_PATH");
if (!String.IsNullOrEmpty (monoPath)) {
const string basePath = "/class/lib/";
const string profile = "net_2_0";
var basePathIndex = monoPath.IndexOf (basePath, StringComparison.Ordinal);
if (basePathIndex > 0 && basePathIndex + basePath.Length + profile.Length <= monoPath.Length) {
var currentProfile = monoPath.Substring (basePathIndex + basePath.Length, profile.Length);
if (currentProfile.Equals (profile, StringComparison.OrdinalIgnoreCase))
monoPath = monoPath.Replace (basePath + currentProfile, basePath + "net_4_0");
}
mcs.StartInfo.EnvironmentVariables ["MONO_PATH"] = monoPath;
}
}
#endif
/*
string monoPath = Environment.GetEnvironmentVariable ("MONO_PATH");
if (monoPath != null)
@@ -370,11 +342,7 @@ namespace Mono.CSharp
string langver;
if (!providerOptions.TryGetValue ("CompilerVersion", out langver))
#if NET_4_0
langver = "3.5";
#else
langver = "2.0";
#endif
if (langver.Length >= 1 && langver [0] == 'v')
langver = langver.Substring (1);
@@ -390,13 +358,7 @@ namespace Mono.CSharp
}
}
#if NET_4_5
args.Append("/sdk:4.5");
#elif NET_4_0
args.Append("/sdk:4");
#else
args.Append("/sdk:2");
#endif
args.Append (" -- ");
foreach (string source in fileNames)