Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ILCompiler.Compiler/src/Compiler/PrecomputedMetadataManager.cs6
-rw-r--r--src/ILCompiler.Compiler/src/Compiler/UtcStackTraceEmissionPolicy.cs10
2 files changed, 16 insertions, 0 deletions
diff --git a/src/ILCompiler.Compiler/src/Compiler/PrecomputedMetadataManager.cs b/src/ILCompiler.Compiler/src/Compiler/PrecomputedMetadataManager.cs
index f21cedb90..2191198f0 100644
--- a/src/ILCompiler.Compiler/src/Compiler/PrecomputedMetadataManager.cs
+++ b/src/ILCompiler.Compiler/src/Compiler/PrecomputedMetadataManager.cs
@@ -435,6 +435,12 @@ namespace ILCompiler
{
MetadataLoadedInfo loadedMetadata = _loadedMetadata.Value;
+ // Add all non-generic reflectable types as roots.
+ foreach (var type in loadedMetadata.TypesWithStrongMetadataMappings)
+ {
+ rootProvider.AddCompilationRoot(type, "Required non-generic type");
+ }
+
// Add all non-generic reflectable methods as roots.
// Virtual methods need special handling (e.g. with dependency tracking) since they can be abstract.
foreach (var method in loadedMetadata.MethodMappings.Keys)
diff --git a/src/ILCompiler.Compiler/src/Compiler/UtcStackTraceEmissionPolicy.cs b/src/ILCompiler.Compiler/src/Compiler/UtcStackTraceEmissionPolicy.cs
index 533759f15..1c44d690e 100644
--- a/src/ILCompiler.Compiler/src/Compiler/UtcStackTraceEmissionPolicy.cs
+++ b/src/ILCompiler.Compiler/src/Compiler/UtcStackTraceEmissionPolicy.cs
@@ -122,9 +122,14 @@ namespace ILCompiler
/// </summary>
string GetAppExeDirectory()
{
+#if !CORERT
var process = Process.GetCurrentProcess();
string fullPath = process.MainModule.FileName;
return Path.GetDirectoryName(fullPath);
+#else
+ Debug.Assert(false);
+ return null;
+#endif
}
/// <summary>
@@ -132,6 +137,10 @@ namespace ILCompiler
/// </summary>
void LoadExceptionFile(string exceptionFileName)
{
+#if CORERT
+ Debug.Assert(false);
+ return;
+#else
if (!File.Exists(exceptionFileName))
return;
@@ -183,6 +192,7 @@ namespace ILCompiler
line = tr.ReadLine();
}
}
+#endif
}
}
}