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:
authorLuqun Lou <luqunl@microsoft.com>2017-10-21 01:00:33 +0300
committerLuqun Lou <luqunl@microsoft.com>2017-10-21 01:00:33 +0300
commitc94da6f051e88bd8709b2aa625e37aa3c5ab9337 (patch)
treec02c203b6992efe14fc96ed6012cdcbb0100abda /src/System.Private.Interop
parentb674c8cfe1802c553cb5463393ac9f02f58b5e67 (diff)
Enable LibraryInitializer for Mcg on miniwinrt
Mcg on MiniWinRT scenario need to use LibraryInitializer to run specific static class constructors. By the way, Mcg on miniWinRT doesn't need pinvoke data support and Mcg on Coreclr do need pinvoke support TODO: enable RuntimeAugments.InitializeInteropLookups for mcg on coreclr scenario [tfs-changeset: 1678783]
Diffstat (limited to 'src/System.Private.Interop')
-rw-r--r--src/System.Private.Interop/src/Internal/Runtime/CompilerHelpers/LibraryInitializer.cs6
-rw-r--r--src/System.Private.Interop/src/System.Private.Interop.Shared.projitems1
-rw-r--r--src/System.Private.Interop/src/System.Private.Interop.csproj2
3 files changed, 8 insertions, 1 deletions
diff --git a/src/System.Private.Interop/src/Internal/Runtime/CompilerHelpers/LibraryInitializer.cs b/src/System.Private.Interop/src/Internal/Runtime/CompilerHelpers/LibraryInitializer.cs
index 95ea711f0..ff45c4130 100644
--- a/src/System.Private.Interop/src/Internal/Runtime/CompilerHelpers/LibraryInitializer.cs
+++ b/src/System.Private.Interop/src/Internal/Runtime/CompilerHelpers/LibraryInitializer.cs
@@ -6,7 +6,9 @@ using System;
using System.Runtime;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
+#if !CORECLR
using Internal.Runtime.Augments;
+#endif
namespace Internal.Runtime.CompilerHelpers
{
@@ -22,7 +24,11 @@ namespace Internal.Runtime.CompilerHelpers
__vtable_IUnknown.Initialize();
McgModuleManager.Initialize();
#endif
+
+#if !CORECLR
+ /// @TODO: enable this for Mcg on CoreCLR scenario
RuntimeAugments.InitializeInteropLookups(RuntimeInteropData.Instance);
+#endif
}
}
}
diff --git a/src/System.Private.Interop/src/System.Private.Interop.Shared.projitems b/src/System.Private.Interop/src/System.Private.Interop.Shared.projitems
index 041fbc43f..5b104807a 100644
--- a/src/System.Private.Interop/src/System.Private.Interop.Shared.projitems
+++ b/src/System.Private.Interop/src/System.Private.Interop.Shared.projitems
@@ -59,6 +59,7 @@
</Compile>
<Compile Include="Interop\Interop.Memory.cs" />
+ <Compile Include="Internal\Runtime\CompilerHelpers\LibraryInitializer.cs"/>
</ItemGroup>
<ItemGroup Condition="'$(TargetsWindows)' == 'true'">
diff --git a/src/System.Private.Interop/src/System.Private.Interop.csproj b/src/System.Private.Interop/src/System.Private.Interop.csproj
index 2bfdeb27d..525f210c3 100644
--- a/src/System.Private.Interop/src/System.Private.Interop.csproj
+++ b/src/System.Private.Interop/src/System.Private.Interop.csproj
@@ -143,7 +143,7 @@
<Compile Include="System\Runtime\InteropServices\ComTypes\varflags.cs" />
<Compile Include="System\Runtime\InteropServices\ComTypes\varkind.cs" />
<Compile Include="Internal\Runtime\CompilerHelpers\RuntimeInteropData.cs"/>
- <Compile Include="Internal\Runtime\CompilerHelpers\LibraryInitializer.cs" />
+
<Compile Condition="'$(IsProjectNLibrary)' == 'true'" Include="Internal\Runtime\CompilerHelpers\RuntimeInteropData.ProjectN.cs"/>
<Compile Condition="'$(IsProjectNLibrary)' != 'true'" Include="Internal\Runtime\CompilerHelpers\RuntimeInteropData.CoreRT.cs"/>
</ItemGroup>