From c04c688db16c8f0cd3d726634b0470996cea437c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tom=C3=A1=C5=A1=20Rylek?= Date: Tue, 29 Oct 2019 20:57:02 -0700 Subject: [PATCH] Fix copying of framework assemblies excluded from compilation (dotnet/coreclr#27534) Commit migrated from https://github.com/dotnet/coreclr/commit/73a6c7bf96a5671807006ab11e699ee5eb99693f --- src/coreclr/src/tools/ReadyToRun.SuperIlc/BuildFolderSet.cs | 10 +++++++--- src/coreclr/src/tools/ReadyToRun.SuperIlc/ProcessRunner.cs | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/coreclr/src/tools/ReadyToRun.SuperIlc/BuildFolderSet.cs b/src/coreclr/src/tools/ReadyToRun.SuperIlc/BuildFolderSet.cs index 53a2704..3bf6ab1 100644 --- a/src/coreclr/src/tools/ReadyToRun.SuperIlc/BuildFolderSet.cs +++ b/src/coreclr/src/tools/ReadyToRun.SuperIlc/BuildFolderSet.cs @@ -300,7 +300,11 @@ namespace ReadyToRun.SuperIlc ParallelRunner.Run(compilationsToRun, _options.DegreeOfParallelism); - HashSet skipCopying = new HashSet(StringComparer.OrdinalIgnoreCase); + HashSet[] skipCopying = new HashSet[(int)CompilerIndex.Count]; + foreach (CompilerRunner runner in frameworkRunners) + { + skipCopying[(int)runner.Index] = new HashSet(StringComparer.OrdinalIgnoreCase); + } int[] failedCompilationsPerBuilder = new int[(int)CompilerIndex.Count]; int successfulCompileCount = 0; int failedCompileCount = 0; @@ -316,7 +320,7 @@ namespace ReadyToRun.SuperIlc } else if (compilationProcess.Succeeded) { - skipCopying.Add(compilationProcess.Parameters.InputFileName); + skipCopying[(int)runner.Index].Add(compilationProcess.Parameters.InputFileName); AnalyzeCompilationLog(compilationProcess, runner.Index); } else @@ -341,7 +345,7 @@ namespace ReadyToRun.SuperIlc string outputPath = runner.GetOutputPath(coreRoot); foreach (string file in frameworkFolderFiles) { - if (!skipCopying.Contains(file)) + if (!skipCopying[(int)runner.Index].Contains(file)) { string targetFile = Path.Combine(outputPath, Path.GetFileName(file)); File.Copy(file, targetFile, overwrite: true); diff --git a/src/coreclr/src/tools/ReadyToRun.SuperIlc/ProcessRunner.cs b/src/coreclr/src/tools/ReadyToRun.SuperIlc/ProcessRunner.cs index 0a7b5b4..e3365cf 100644 --- a/src/coreclr/src/tools/ReadyToRun.SuperIlc/ProcessRunner.cs +++ b/src/coreclr/src/tools/ReadyToRun.SuperIlc/ProcessRunner.cs @@ -14,7 +14,7 @@ public class ProcessParameters /// /// Maximum time for CPAOT / Crossgen compilation. /// - public const int DefaultIlcTimeout = 5 * 60 * 1000; + public const int DefaultIlcTimeout = 10 * 60 * 1000; /// /// Test execution timeout. -- 2.7.4