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:
authorJan Kotas <jkotas@microsoft.com>2015-11-11 17:04:37 +0300
committerJan Kotas <jkotas@microsoft.com>2015-11-11 19:50:35 +0300
commitb5aabefef062c327cf65cb3a20c730ff82667825 (patch)
tree4967e85aca36c313b8f8e785c7c9e4c33683c382 /src/Runtime.Base
parent26e0c761cef1abb6a66f9ea77e9cadd7d0673ae2 (diff)
Add Runtime.Base.dll to the build
- Most of the .csproj file plumbing is copied from System.Private.CoreLib.dll - Runtime.Base.dll build depends on AsmOffsets.h run through C++ preprocessor produced during CMake step of the build
Diffstat (limited to 'src/Runtime.Base')
-rw-r--r--src/Runtime.Base/src/AsmOffsets.cspp11
-rw-r--r--src/Runtime.Base/src/RhBaseName.cs4
-rw-r--r--src/Runtime.Base/src/Runtime.Base.csproj153
-rw-r--r--src/Runtime.Base/src/System/Runtime/EEType.cs6
4 files changed, 171 insertions, 3 deletions
diff --git a/src/Runtime.Base/src/AsmOffsets.cspp b/src/Runtime.Base/src/AsmOffsets.cspp
new file mode 100644
index 000000000..fedc1466c
--- /dev/null
+++ b/src/Runtime.Base/src/AsmOffsets.cspp
@@ -0,0 +1,11 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+#define PLAT_ASM_OFFSET(offset, cls, member) internal const int OFFSETOF__##cls##__##member = 0x##offset;
+#define PLAT_ASM_SIZEOF(offset, cls) internal const int SIZEOF__##cls = 0x##offset;
+#define PLAT_ASM_CONST(constant, expr) internal const int expr = 0x##constant;
+
+static class AsmOffsets
+{
+#include "../../Native/Runtime/AsmOffsets.h"
+}
diff --git a/src/Runtime.Base/src/RhBaseName.cs b/src/Runtime.Base/src/RhBaseName.cs
new file mode 100644
index 000000000..0a8aacf55
--- /dev/null
+++ b/src/Runtime.Base/src/RhBaseName.cs
@@ -0,0 +1,4 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+internal class Redhawk { public const string BaseName = "*"; }
diff --git a/src/Runtime.Base/src/Runtime.Base.csproj b/src/Runtime.Base/src/Runtime.Base.csproj
new file mode 100644
index 000000000..40dc61963
--- /dev/null
+++ b/src/Runtime.Base/src/Runtime.Base.csproj
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+
+ <PropertyGroup>
+ <ProjectGuid>{BE95C560-B508-4588-8907-F9FC5BC1A0CF}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AssemblyName>Runtime.Base</AssemblyName>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ExcludeDefaultReferences>true</ExcludeDefaultReferences>
+ <IsCoreAssembly>true</IsCoreAssembly>
+ <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <!--
+ Need to avoid target platform being empty because that would drag in an mscorlib design-time
+ facade into the references and break us.
+ -->
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+ <TargetPlatformIdentifier>Portable</TargetPlatformIdentifier>
+ <TargetFrameworkIdentifier>.NETPortable</TargetFrameworkIdentifier>
+ <TargetFrameworkProfile>Profile7</TargetFrameworkProfile>
+ <TargetFrameworkMonikerDisplayName>.NET Portable Subset</TargetFrameworkMonikerDisplayName>
+ <ImplicitlyExpandTargetFramework>false</ImplicitlyExpandTargetFramework>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <!-- The properties use amd64 as their platform string, we want to keep in sync with those, so set Platform appropriately,
+ though still use the 'x64' output path -->
+ <Platform Condition=" '$(Platform)' == 'x64' ">amd64</Platform>
+ </PropertyGroup>
+
+ <!-- Default configurations to help VS understand the options -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <PlatformTarget>x86</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|amd64' ">
+ <PlatformTarget>x64</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|amd64' ">
+ <PlatformTarget>x64</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|arm' ">
+ <PlatformTarget>arm</PlatformTarget>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|arm' ">
+ <PlatformTarget>arm</PlatformTarget>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <SkipCommonResourcesIncludes>true</SkipCommonResourcesIncludes>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <DefineConstants>FEATURE_CLR_EH;FEATURE_SHARED_GENERICS;$(DefineConstants)</DefineConstants>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
+ <DefineConstants>FEATURE_GC_STRESS;$(DefineConstants)</DefineConstants>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(Platform)' == 'amd64'">
+ <DefineConstants>AMD64;BIT64;$(DefineConstants)</DefineConstants>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Platform)' == 'x86'">
+ <DefineConstants>X86;$(DefineConstants)</DefineConstants>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Platform)' == 'arm'">
+ <DefineConstants>ARM;FEATURE_64BIT_ALIGNMENT;$(DefineConstants)</DefineConstants>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Platform)' == 'arm64'">
+ <DefineConstants>ARM64;BIT64;$(DefineConstants)</DefineConstants>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(IsProjectNLibrary)' != 'true'">
+ <DefineConstants>CORERT;$(DefineConstants)</DefineConstants>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <Compile Include="System\Nullable.cs" />
+ <Compile Include="System\Object.cs" />
+ <Compile Include="System\Runtime\CachedInterfaceDispatch.cs" />
+ <Compile Include="System\Runtime\CompilerServices\StackOnlyAttribute.cs" />
+ <Compile Include="System\Runtime\DispatchResolve.cs" />
+ <Compile Include="System\Runtime\GCStress.cs" />
+ <Compile Include="System\Runtime\BinderIntrinsics.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="System\Array.cs" />
+ <Compile Include="System\Attribute.cs" />
+ <Compile Include="System\AttributeTargets.cs" />
+ <Compile Include="System\AttributeUsageAttribute.cs" />
+ <Compile Include="System\Delegate.cs" />
+ <Compile Include="System\Exception.cs" />
+ <Compile Include="System\FlagsAttribute.cs" />
+ <Compile Include="System\GC.cs" />
+ <Compile Include="System\multicastdelegate.cs" />
+ <Compile Include="System\ParamArrayAttribute.cs" />
+ <Compile Include="System\primitives.cs" />
+ <Compile Include="System\RuntimeHandles.cs" />
+ <Compile Include="System\RuntimeTypeHandle.cs" />
+ <Compile Include="System\String.cs" />
+ <Compile Include="System\Void.cs" />
+ <Compile Include="System\Diagnostics\ConditionalAttribute.cs" />
+ <Compile Include="System\Diagnostics\Debug.cs" />
+ <Compile Include="System\Runtime\__Finalizer.cs" />
+ <Compile Include="System\Runtime\CalliIntrinsics.cs" />
+ <Compile Include="System\Runtime\EEType.cs" />
+ <Compile Include="System\Runtime\EETypePtr.cs" />
+ <Compile Include="System\Runtime\ExceptionHandling.cs" />
+ <Compile Include="System\Runtime\ExceptionIDs.cs" />
+ <Compile Include="System\Runtime\InternalCalls.cs" />
+ <Compile Include="System\Runtime\RuntimeExportAttribute.cs" />
+ <Compile Include="System\Runtime\Runtimeexports.cs" />
+ <Compile Include="System\Runtime\RuntimeImportAttribute.cs" />
+ <Compile Include="System\Runtime\StackFrameIterator.cs" />
+ <Compile Include="System\Runtime\TypeCast.cs" />
+ <Compile Include="System\Runtime\CompilerServices\FixedBufferAttribute.cs" />
+ <Compile Include="System\Runtime\CompilerServices\IntrinsicAttribute.cs" />
+ <Compile Include="System\Runtime\CompilerServices\ICastable.cs" />
+ <Compile Include="System\Runtime\CompilerServices\IsVolatile.cs" />
+ <Compile Include="System\Runtime\CompilerServices\ManuallyManagedAttribute.cs" />
+ <Compile Include="System\Runtime\CompilerServices\MethodImplAttribute.cs" />
+ <Compile Include="System\Runtime\CompilerServices\RuntimeHelpers.cs" />
+ <Compile Include="System\Runtime\CompilerServices\UnsafeValueTypeAttribute.cs" />
+ <Compile Include="System\Runtime\InteropServices\CallingConvention.cs" />
+ <Compile Include="System\Runtime\InteropServices\CharSet.cs" />
+ <Compile Include="System\Runtime\InteropServices\DllImportAttribute.cs" />
+ <Compile Include="System\Runtime\InteropServices\FieldOffsetAttribute.cs" />
+ <Compile Include="System\Runtime\interopservices\GCHandle.cs" />
+ <Compile Include="System\Runtime\InteropServices\LayoutKind.cs" />
+ <Compile Include="System\Runtime\InteropServices\NativeCallableAttribute.cs" />
+ <Compile Include="System\Runtime\InteropServices\OutAttribute.cs" />
+ <Compile Include="System\Runtime\InteropServices\StructLayoutAttribute.cs" />
+ <Compile Include="RhBaseName.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="$(BaseIntermediateOutputPath)\Native\$(BinDirOSGroup).$(BinDirPlatform)\Runtime\Full\AsmOffsets.cs" />
+ </ItemGroup>
+
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+
+ <PropertyGroup>
+ <!-- Exclude AssemblyInfoPartialFile -->
+ <AssemblyInfoPartialFile></AssemblyInfoPartialFile>
+ </PropertyGroup>
+
+</Project>
diff --git a/src/Runtime.Base/src/System/Runtime/EEType.cs b/src/Runtime.Base/src/System/Runtime/EEType.cs
index 56110a83b..066c83ce8 100644
--- a/src/Runtime.Base/src/System/Runtime/EEType.cs
+++ b/src/Runtime.Base/src/System/Runtime/EEType.cs
@@ -695,10 +695,10 @@ namespace System.Runtime
{
if ((unchecked((uint)_interfaceType._pInterfaceEEType) & 1u) != 0)
{
-#if WIN32
- EEType** ppInterfaceEETypeViaIAT = (EEType**)(((uint)_interfaceType._ppInterfaceEETypeViaIAT) & ~1u);
-#else
+#if BIT64
EEType** ppInterfaceEETypeViaIAT = (EEType**)(((ulong)_interfaceType._ppInterfaceEETypeViaIAT) & ~1ul);
+#else
+ EEType** ppInterfaceEETypeViaIAT = (EEType**)(((uint)_interfaceType._ppInterfaceEETypeViaIAT) & ~1u);
#endif
return *ppInterfaceEETypeViaIAT;
}