[CoreCLR] Added support to compile against CoreCLR.

This commit is contained in:
Emmanuel Stapf 2015-10-15 10:03:22 +09:00
Родитель 151092b3e4
Коммит 4b9e1e1163
7 изменённых файлов: 118 добавлений и 5 удалений

3
.gitmodules поставляемый Normal file
Просмотреть файл

@ -0,0 +1,3 @@
[submodule "CoreFX"]
path = CoreFX
url = https://github.com/manu-silicon/corefxref.git

1
CoreFX Submodule

@ -0,0 +1 @@
Subproject commit 00c228f7e217e44afd3031955891e3ef67cf34fe

86
CppNet_CoreCLR.csproj Normal file
Просмотреть файл

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{C2FD9262-69F8-4B75-9AB1-FF359C9143E9}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CppNet</RootNamespace>
<AssemblyName>CppNet</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkRootPath>$(SolutionDir)\CoreFX\</TargetFrameworkRootPath>
<FrameworkPathOverride>$(TargetFrameworkRootPath)\CoreCLR\v5.0</FrameworkPathOverride>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>cppnet.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Argument.cs" />
<Compile Include="Feature.cs" />
<Compile Include="FileLexerSource.cs" />
<Compile Include="FixedTokenSource.cs" />
<Compile Include="JavaCompat\JavaCompat.cs" />
<Compile Include="JavaFile.cs" />
<Compile Include="JavaFileSystem.cs" />
<Compile Include="JoinReader.cs" />
<Compile Include="LexerException.cs" />
<Compile Include="LexerSource.cs" />
<Compile Include="Macro.cs" />
<Compile Include="MacroTokenSource.cs" />
<Compile Include="Preprocessor.cs" />
<Compile Include="PreprocessorListener.cs" />
<Compile Include="PreprocessorListenerBase.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Source.cs" />
<Compile Include="SourceIterator.cs" />
<Compile Include="State.cs" />
<Compile Include="StringLexerSource.cs" />
<Compile Include="Token.cs" />
<Compile Include="VirtualFile.cs" />
<Compile Include="VirtualFileSystem.cs" />
<Compile Include="Warning.cs" />
</ItemGroup>
<ItemGroup>
<None Include="cppnet.snk" />
</ItemGroup>
<Import Project="$(TargetFrameworkRootPath)\configs\CoreCLR.CSharp.targets"/>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

22
CppNet_CoreCLR.sln Normal file
Просмотреть файл

@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CppNet_CoreCLR", "CppNet_CoreCLR.csproj", "{C2FD9262-69F8-4B75-9AB1-FF359C9143E9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C2FD9262-69F8-4B75-9AB1-FF359C9143E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C2FD9262-69F8-4B75-9AB1-FF359C9143E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C2FD9262-69F8-4B75-9AB1-FF359C9143E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C2FD9262-69F8-4B75-9AB1-FF359C9143E9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Просмотреть файл

@ -191,7 +191,7 @@ namespace CppNet
if(_in == null) {
return;
}
_in.Close();
_in.Dispose();
}
@ -218,4 +218,4 @@ namespace CppNet
*/
}
}
}

Просмотреть файл

@ -17,6 +17,7 @@
using System;
using System.IO;
using System.Text;
using System.Globalization;
namespace CppNet {
@ -33,7 +34,7 @@ public class LexerSource : Source {
return c >= 0 && c <= 8 ||
c >= 0xE && c <= 0x1B ||
c >= 0x7F && c <= 0x9F ||
char.GetUnicodeCategory((char)c) == System.Globalization.UnicodeCategory.Format;
CharUnicodeInfo.GetUnicodeCategory((char)c) == UnicodeCategory.Format;
}
static int digit(char ch, int radix)
@ -822,4 +823,4 @@ public class LexerSource : Source {
}
}
}
}

Просмотреть файл

@ -50,7 +50,7 @@ namespace CppNet
} catch(LexerException e) {
throw new IllegalStateException(e);
} catch(IOException e) {
throw new ApplicationException("",e);
throw new Exception("",e);
}
}