Imported Upstream version 4.2.0.179

Former-commit-id: 4610231f55806d2a05ed69e5ff3faa7336cc1479
This commit is contained in:
Xamarin Public Jenkins
2015-08-26 07:17:56 -04:00
committed by Jo Shields
parent aa7da660d6
commit c042cd0c52
7507 changed files with 90259 additions and 657307 deletions

View File

@@ -50,6 +50,7 @@ namespace Mono.CSharp
{
static string windowsMcsPath;
static string windowsMonoPath;
static string unixMcsCommand;
Mutex mcsOutMutex;
StringCollection mcsOutput;
@@ -85,6 +86,13 @@ namespace Mono.CSharp
if (!File.Exists (windowsMcsPath))
throw new FileNotFoundException ("Windows mcs path not found: " + windowsMcsPath);
} else {
var mscorlibPath = new Uri (typeof (object).Assembly.CodeBase).LocalPath;
var unixMcsPath = Path.GetFullPath (Path.Combine (mscorlibPath, "..", "..", "..", "..", "bin", "mcs"));
if (File.Exists (unixMcsPath))
unixMcsCommand = unixMcsPath;
else
unixMcsCommand = "mcs";
}
}
@@ -173,7 +181,7 @@ namespace Mono.CSharp
mcs.StartInfo.Arguments = "\"" + windowsMcsPath + "\" " +
BuildArgs (options, fileNames, ProviderOptions);
} else {
mcs.StartInfo.FileName="mcs";
mcs.StartInfo.FileName=unixMcsCommand;
mcs.StartInfo.Arguments=BuildArgs(options, fileNames, ProviderOptions);
}

View File

@@ -205,13 +205,15 @@ namespace Mono.CSharp
foreach (CodeNamespace codeNamespace in compileUnit.Namespaces) {
if (string.IsNullOrEmpty (codeNamespace.Name)) {
global_imports = codeNamespace.Imports;
codeNamespace.Imports = new CodeNamespaceImportCollection ();
codeNamespace.Imports.Clear ();
}
GenerateNamespace (codeNamespace);
if (global_imports != null) {
codeNamespace.Imports = global_imports;
codeNamespace.Imports.Clear ();
foreach (CodeNamespaceImport ns in global_imports)
codeNamespace.Imports.Add (ns);
global_imports = null;
}
}