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-14 03:54:12 +0300
committerJan Kotas <jkotas@microsoft.com>2015-11-14 04:11:57 +0300
commit636f8d3a976044ebb5b70d32dfdca42af4391f49 (patch)
tree755ad15d0b05610a99b1c00d5ec98646d9941377 /src/ILCompiler
parent3c1639cbf1f0ea9708b8addf8cbd624b024d1d34 (diff)
Rename ILToNative
- Rename the compiler .exe to ilc.exe - Rename ILToNative.* to ILCompiler.* everywhere else
Diffstat (limited to 'src/ILCompiler')
-rw-r--r--src/ILCompiler/ILCompiler.sln58
-rw-r--r--src/ILCompiler/desktop/desktop.csproj73
-rw-r--r--src/ILCompiler/desktop/project.json29
-rw-r--r--src/ILCompiler/repro/Program.cs13
-rw-r--r--src/ILCompiler/repro/project.json22
-rw-r--r--src/ILCompiler/repro/repro.csproj46
-rw-r--r--src/ILCompiler/reproNative/reproNative.vcxproj101
-rw-r--r--src/ILCompiler/reproNative/reproNativeCpp.vcxproj104
-rw-r--r--src/ILCompiler/src/ILCompiler.csproj50
-rw-r--r--src/ILCompiler/src/Program.cs194
-rw-r--r--src/ILCompiler/src/project.json28
11 files changed, 718 insertions, 0 deletions
diff --git a/src/ILCompiler/ILCompiler.sln b/src/ILCompiler/ILCompiler.sln
new file mode 100644
index 000000000..8e499e1b0
--- /dev/null
+++ b/src/ILCompiler/ILCompiler.sln
@@ -0,0 +1,58 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.24620.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ILCompiler", "src\ILCompiler.csproj", "{DD5B6BAA-D41A-4A6E-9E7D-83060F394B10}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "repro", "repro\repro.csproj", "{FBA029C3-B184-4457-AEEC-38D0C2523067}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ILCompiler.TypeSystem", "..\ILCompiler.TypeSystem\src\ILCompiler.TypeSystem.csproj", "{1A9DF196-43A9-44BB-B2C6-D62AA56B0E49}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ILCompiler.DependencyAnalysisFramework", "..\ILCompiler.DependencyAnalysisFramework\src\ILCompiler.DependencyAnalysisFramework.csproj", "{DAC23E9F-F826-4577-AE7A-0849FF83280C}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ILCompiler.Compiler", "..\ILCompiler.Compiler\src\ILCompiler.Compiler.csproj", "{13BB3788-C3EB-4046-8105-A95F8AE49404}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "desktop", "desktop\desktop.csproj", "{B2C35178-5E42-4010-A72A-938711D7F8F0}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Private.CoreLib", "..\System.Private.CoreLib\src\System.Private.CoreLib.csproj", "{BE95C560-B508-4588-8907-F9FC5BC1A0CF}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x64 = Debug|x64
+ Release|x64 = Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {DD5B6BAA-D41A-4A6E-9E7D-83060F394B10}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {DD5B6BAA-D41A-4A6E-9E7D-83060F394B10}.Debug|x64.Build.0 = Debug|Any CPU
+ {DD5B6BAA-D41A-4A6E-9E7D-83060F394B10}.Release|x64.ActiveCfg = Release|Any CPU
+ {DD5B6BAA-D41A-4A6E-9E7D-83060F394B10}.Release|x64.Build.0 = Release|Any CPU
+ {FBA029C3-B184-4457-AEEC-38D0C2523067}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {FBA029C3-B184-4457-AEEC-38D0C2523067}.Debug|x64.Build.0 = Debug|Any CPU
+ {FBA029C3-B184-4457-AEEC-38D0C2523067}.Release|x64.ActiveCfg = Release|Any CPU
+ {FBA029C3-B184-4457-AEEC-38D0C2523067}.Release|x64.Build.0 = Release|Any CPU
+ {1A9DF196-43A9-44BB-B2C6-D62AA56B0E49}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {1A9DF196-43A9-44BB-B2C6-D62AA56B0E49}.Debug|x64.Build.0 = Debug|Any CPU
+ {1A9DF196-43A9-44BB-B2C6-D62AA56B0E49}.Release|x64.ActiveCfg = Release|Any CPU
+ {1A9DF196-43A9-44BB-B2C6-D62AA56B0E49}.Release|x64.Build.0 = Release|Any CPU
+ {DAC23E9F-F826-4577-AE7A-0849FF83280C}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {DAC23E9F-F826-4577-AE7A-0849FF83280C}.Debug|x64.Build.0 = Debug|Any CPU
+ {DAC23E9F-F826-4577-AE7A-0849FF83280C}.Release|x64.ActiveCfg = Release|Any CPU
+ {DAC23E9F-F826-4577-AE7A-0849FF83280C}.Release|x64.Build.0 = Release|Any CPU
+ {13BB3788-C3EB-4046-8105-A95F8AE49404}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {13BB3788-C3EB-4046-8105-A95F8AE49404}.Debug|x64.Build.0 = Debug|Any CPU
+ {13BB3788-C3EB-4046-8105-A95F8AE49404}.Release|x64.ActiveCfg = Release|Any CPU
+ {13BB3788-C3EB-4046-8105-A95F8AE49404}.Release|x64.Build.0 = Release|Any CPU
+ {B2C35178-5E42-4010-A72A-938711D7F8F0}.Debug|x64.ActiveCfg = Debug|x64
+ {B2C35178-5E42-4010-A72A-938711D7F8F0}.Debug|x64.Build.0 = Debug|x64
+ {B2C35178-5E42-4010-A72A-938711D7F8F0}.Release|x64.ActiveCfg = Release|x64
+ {B2C35178-5E42-4010-A72A-938711D7F8F0}.Release|x64.Build.0 = Release|x64
+ {BE95C560-B508-4588-8907-F9FC5BC1A0CF}.Debug|x64.ActiveCfg = Debug|amd64
+ {BE95C560-B508-4588-8907-F9FC5BC1A0CF}.Debug|x64.Build.0 = Debug|amd64
+ {BE95C560-B508-4588-8907-F9FC5BC1A0CF}.Release|x64.ActiveCfg = Release|amd64
+ {BE95C560-B508-4588-8907-F9FC5BC1A0CF}.Release|x64.Build.0 = Release|amd64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/src/ILCompiler/desktop/desktop.csproj b/src/ILCompiler/desktop/desktop.csproj
new file mode 100644
index 000000000..bea71f8e9
--- /dev/null
+++ b/src/ILCompiler/desktop/desktop.csproj
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{B2C35178-5E42-4010-A72A-938711D7F8F0}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>ILCompiler</RootNamespace>
+ <AssemblyName>ILCompiler</AssemblyName>
+ <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+ <PlatformTarget>x64</PlatformTarget>
+ <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|x64'">
+ <PlatformTarget>x64</PlatformTarget>
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="..\src\Program.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="..\..\Common\src\CommandLine\CommandLineException.cs">
+ <Link>CommandLine\CommandLineException.cs</Link>
+ </Compile>
+ <Compile Include="..\..\Common\src\CommandLine\CommandLineParser.cs">
+ <Link>CommandLine\CommandLineParser.cs</Link>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\ILCompiler.Compiler\src\ILCompiler.Compiler.csproj">
+ <Project>{13bb3788-c3eb-4046-8105-a95f8ae49404}</Project>
+ <Name>ILCompiler.Compiler</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\ILCompiler.TypeSystem\src\ILCompiler.TypeSystem.csproj">
+ <Project>{1a9df196-43a9-44bb-b2c6-d62aa56b0e49}</Project>
+ <Name>ILCompiler.TypeSystem</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="project.json" />
+ </ItemGroup>
+ <ItemGroup>
+ <Reference Include="mscorlib" />
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.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> \ No newline at end of file
diff --git a/src/ILCompiler/desktop/project.json b/src/ILCompiler/desktop/project.json
new file mode 100644
index 000000000..f12cfd123
--- /dev/null
+++ b/src/ILCompiler/desktop/project.json
@@ -0,0 +1,29 @@
+{
+ "dependencies": {
+ "System.Runtime": "4.0.20",
+ "System.Resources.ResourceManager": "4.0.0",
+ "System.Reflection.Primitives": "4.0.0",
+ "System.Diagnostics.Debug": "4.0.10",
+ "System.IO": "4.0.10",
+ "System.IO.FileSystem": "4.0.0",
+ "System.Collections": "4.0.10",
+ "System.Text.Encoding": "4.0.10",
+ "System.Runtime.InteropServices": "4.0.20",
+ "System.Reflection": "4.0.0",
+ "System.Runtime.Extensions": "4.0.10",
+ "System.Threading": "4.0.10",
+ "System.Text.Encoding.Extensions": "4.0.10",
+ "System.Reflection.Extensions": "4.0.0",
+ "System.Console": "4.0.0-beta-23419",
+ "System.AppContext": "4.0.0",
+ "System.Collections.Immutable": "1.1.37",
+ "System.Reflection.Metadata": "1.0.22",
+ "Microsoft.DiaSymReader": "1.0.6"
+ },
+ "frameworks": {
+ "net46": {}
+ },
+ "runtimes": {
+ "win-x64": {}
+ }
+} \ No newline at end of file
diff --git a/src/ILCompiler/repro/Program.cs b/src/ILCompiler/repro/Program.cs
new file mode 100644
index 000000000..328ce8871
--- /dev/null
+++ b/src/ILCompiler/repro/Program.cs
@@ -0,0 +1,13 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+
+internal class Program
+{
+ private static void Main(string[] args)
+ {
+ Console.WriteLine("Hello world");
+ }
+}
+
diff --git a/src/ILCompiler/repro/project.json b/src/ILCompiler/repro/project.json
new file mode 100644
index 000000000..fc4a6b379
--- /dev/null
+++ b/src/ILCompiler/repro/project.json
@@ -0,0 +1,22 @@
+{
+ "dependencies": {
+ "System.Runtime": "4.0.20",
+ "System.Resources.ResourceManager": "4.0.0",
+ "System.Reflection.Primitives": "4.0.0",
+ "System.Diagnostics.Debug": "4.0.0",
+ "System.IO": "4.0.10",
+ "System.IO.FileSystem": "4.0.0",
+ "System.Collections": "4.0.0",
+ "System.Text.Encoding": "4.0.0",
+ "System.Runtime.InteropServices": "4.0.10",
+ "System.Reflection": "4.0.0",
+ "System.Runtime.Extensions": "4.0.10",
+ "System.Threading": "4.0.0",
+ "System.Text.Encoding.Extensions": "4.0.0",
+ "System.Reflection.Extensions": "4.0.0",
+ "System.Console": "4.0.0-beta-23419"
+ },
+ "frameworks": {
+ "dnxcore50": {}
+ }
+} \ No newline at end of file
diff --git a/src/ILCompiler/repro/repro.csproj b/src/ILCompiler/repro/repro.csproj
new file mode 100644
index 000000000..e0b4a18eb
--- /dev/null
+++ b/src/ILCompiler/repro/repro.csproj
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{FBA029C3-B184-4457-AEEC-38D0C2523067}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>
+ </RootNamespace>
+ <AssemblyName>repro</AssemblyName>
+ <DefaultLanguage>en-US</DefaultLanguage>
+ <FileAlignment>512</FileAlignment>
+ <CLSCompliant>false</CLSCompliant>
+ <ExcludeResourcesImport>true</ExcludeResourcesImport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>TRACE;DEBUG</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ </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>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <PropertyGroup>
+ <StartupObject />
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="Program.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="project.json" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+</Project> \ No newline at end of file
diff --git a/src/ILCompiler/reproNative/reproNative.vcxproj b/src/ILCompiler/reproNative/reproNative.vcxproj
new file mode 100644
index 000000000..4f9330a7c
--- /dev/null
+++ b/src/ILCompiler/reproNative/reproNative.vcxproj
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{ECB5D162-A31B-45FF-87C7-2E92BD445F5A}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>reproNative</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SDLCheck>true</SDLCheck>
+ <PrecompiledHeaderFile>common.h</PrecompiledHeaderFile>
+ <AdditionalIncludeDirectories>..\..\Native\gc;..\..\Native\gc\env;..\..\Native\gc\sample</AdditionalIncludeDirectories>
+ <DisableSpecificWarnings>4477</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalDependencies>repro.obj;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);..\..\..\bin\obj\Native\Windows_NT.x64\Runtime\Full\Debug\Runtime.lib</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SDLCheck>true</SDLCheck>
+ <PrecompiledHeaderFile>common.h</PrecompiledHeaderFile>
+ <AdditionalIncludeDirectories>..\gc;..\..\Native\gc\env;..\..\Native\gc\sample</AdditionalIncludeDirectories>
+ <DisableSpecificWarnings>4477</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <AdditionalDependencies>repro.obj;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);..\..\..\bin\obj\Native\Windows_NT.x64\Runtime\Full\Release\Runtime.lib</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\Native\Bootstrap\common.h" />
+ <ClInclude Include="..\..\Native\Bootstrap\platform.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\Native\Bootstrap\common.cpp">
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
+ </ClCompile>
+ <ClCompile Include="..\..\Native\Bootstrap\main.cpp" />
+ <ClCompile Include="..\..\Native\Bootstrap\platform.windows.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
diff --git a/src/ILCompiler/reproNative/reproNativeCpp.vcxproj b/src/ILCompiler/reproNative/reproNativeCpp.vcxproj
new file mode 100644
index 000000000..5921fc424
--- /dev/null
+++ b/src/ILCompiler/reproNative/reproNativeCpp.vcxproj
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{ECB5D162-A31B-45FF-87C7-2E92BD445F5A}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>reproNative</RootNamespace>
+ <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <LinkIncremental>true</LinkIncremental>
+ <IntDir>$(Platform)\$(Configuration)\Cpp\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <LinkIncremental>false</LinkIncremental>
+ <IntDir>$(Platform)\$(Configuration)\Cpp\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>CPPCODEGEN;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SDLCheck>true</SDLCheck>
+ <PrecompiledHeaderFile>common.h</PrecompiledHeaderFile>
+ <AdditionalIncludeDirectories>..\..\Native\gc;..\..\Native\gc\env;..\..\Native\gc\sample</AdditionalIncludeDirectories>
+ <DisableSpecificWarnings>4477</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);..\..\..\bin\obj\Native\Windows_NT.x64\Runtime\Portable\Debug\PortableRuntime.lib</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>CPPCODEGEN;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <SDLCheck>true</SDLCheck>
+ <PrecompiledHeaderFile>common.h</PrecompiledHeaderFile>
+ <AdditionalIncludeDirectories>..\..\Native\gc;..\..\Native\gc\env;..\..\Native\gc\sample</AdditionalIncludeDirectories>
+ <DisableSpecificWarnings>4477</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);..\..\..\bin\obj\Native\Windows_NT.x64\Runtime\Portable\Release\PortableRuntime.lib</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\Native\Bootstrap\common.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\Native\Bootstrap\common.cpp">
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
+ </ClCompile>
+ <ClCompile Include="..\..\Native\Bootstrap\main.cpp" />
+ <ClCompile Include="..\..\Native\Bootstrap\platform.windows.cpp" />
+ <ClCompile Include="repro.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/src/ILCompiler/src/ILCompiler.csproj b/src/ILCompiler/src/ILCompiler.csproj
new file mode 100644
index 000000000..2229bf8ba
--- /dev/null
+++ b/src/ILCompiler/src/ILCompiler.csproj
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProjectGuid>{DD5B6BAA-D41A-4A6E-9E7D-83060F394B10}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <RootNamespace>ILCompiler</RootNamespace>
+ <AssemblyName>ilc</AssemblyName>
+ <DefaultLanguage>en-US</DefaultLanguage>
+ <FileAlignment>512</FileAlignment>
+ <CLSCompliant>false</CLSCompliant>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <ExcludeResourcesImport>true</ExcludeResourcesImport>
+ <DefineConstants>$(DefineConstants);FXCORE</DefineConstants>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup>
+ <StartupObject />
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="Program.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="..\..\Common\src\CommandLine\CommandLineException.cs">
+ <Link>CommandLine\CommandLineException.cs</Link>
+ </Compile>
+ <Compile Include="..\..\Common\src\CommandLine\CommandLineParser.cs">
+ <Link>CommandLine\CommandLineParser.cs</Link>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="project.json" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\ILCompiler.Compiler\src\ILCompiler.Compiler.csproj">
+ <Project>{13bb3788-c3eb-4046-8105-a95f8ae49404}</Project>
+ <Name>ILCompiler.Compiler</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\ILCompiler.TypeSystem\src\ILCompiler.TypeSystem.csproj">
+ <Project>{1a9df196-43a9-44bb-b2c6-d62aa56b0e49}</Project>
+ <Name>ILCompiler.TypeSystem</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+</Project>
diff --git a/src/ILCompiler/src/Program.cs b/src/ILCompiler/src/Program.cs
new file mode 100644
index 000000000..bda427601
--- /dev/null
+++ b/src/ILCompiler/src/Program.cs
@@ -0,0 +1,194 @@
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using System;
+using System.IO;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Reflection.Metadata.Ecma335;
+using System.Runtime.InteropServices;
+
+using Internal.TypeSystem;
+using Internal.TypeSystem.Ecma;
+
+using Internal.CommandLine;
+
+namespace ILCompiler
+{
+ class Program
+ {
+ bool _help;
+
+ string _outputPath;
+
+ Dictionary<string, string> _inputFilePaths = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
+ Dictionary<string, string> _referenceFilePaths = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
+
+ CompilationOptions _options;
+
+ CompilerTypeSystemContext _compilerTypeSystemContext;
+
+ Program()
+ {
+ }
+
+ void Help()
+ {
+ Console.WriteLine("ILCompiler compiler version " + typeof(Program).GetTypeInfo().Assembly.GetName().Version.ToString());
+ Console.WriteLine();
+ Console.WriteLine("-help Display this usage message (Short form: -?)");
+ Console.WriteLine("-out Specify output file name");
+ Console.WriteLine("-dgmllog Dump dgml log of dependency graph to specified file");
+ Console.WriteLine("-fulllog Generate full dependency log graph");
+ Console.WriteLine("-reference Reference metadata from the specified assembly (Short form: -r)");
+ }
+
+ void ParseCommandLine(string[] args)
+ {
+ var parser = new CommandLineParser(args);
+
+ string option;
+ while ((option = parser.GetOption()) != null)
+ {
+ switch (option.ToLowerInvariant())
+ {
+ case "?":
+ case "help":
+ _help = true;
+ break;
+
+ case "":
+ case "in":
+ parser.AppendExpandedPaths(_inputFilePaths, true);
+ break;
+
+ case "o":
+ case "out":
+ _outputPath = parser.GetStringValue();
+ break;
+
+ case "dgmllog":
+ _options.DgmlLog = parser.GetStringValue();
+ break;
+
+ case "fulllog":
+ _options.FullLog = true;
+ break;
+
+ case "r":
+ case "reference":
+ parser.AppendExpandedPaths(_referenceFilePaths, false);
+ break;
+
+ case "cpp":
+ _options.IsCppCodeGen = true;
+ break;
+
+ case "nolinenumbers":
+ _options.NoLineNumbers = true;
+ break;
+
+ default:
+ throw new CommandLineException("Unrecognized option: " + parser.GetCurrentOption());
+ }
+ }
+ }
+
+ EcmaModule GetEntryPointModule()
+ {
+ EcmaModule mainModule = null;
+ foreach (var inputFile in _inputFilePaths)
+ {
+ EcmaModule module = _compilerTypeSystemContext.GetModuleFromPath(inputFile.Value);
+ if (module.PEReader.PEHeaders.IsExe)
+ {
+ if (mainModule != null)
+ throw new CommandLineException("Multiple entrypoint modules");
+ mainModule = module;
+ }
+ }
+ return mainModule;
+ }
+
+ void SingleFileCompilation()
+ {
+ EcmaModule entryPointModule = GetEntryPointModule();
+ if (entryPointModule == null)
+ throw new CommandLineException("No entrypoint module");
+
+ int entryPointToken = entryPointModule.PEReader.PEHeaders.CorHeader.EntryPointTokenOrRelativeVirtualAddress;
+ MethodDesc entryPointMethod = entryPointModule.GetMethod(MetadataTokens.EntityHandle(entryPointToken));
+
+ Compilation compilation = new Compilation(_compilerTypeSystemContext, _options);
+ compilation.Log = Console.Out;
+ compilation.OutputPath = _outputPath;
+ if (_options.IsCppCodeGen)
+ {
+ // Don't set Out when using object writer which is handled by LLVM.
+ compilation.Out = new StreamWriter(File.Create(_outputPath));
+ }
+
+ compilation.CompileSingleFile(entryPointMethod);
+ }
+
+ int Run(string[] args)
+ {
+ ParseCommandLine(args);
+
+ if (_help)
+ {
+ Help();
+ return 1;
+ }
+
+ if (_inputFilePaths.Count == 0)
+ throw new CommandLineException("No input files specified");
+
+ if (_outputPath == null)
+ throw new CommandLineException("Output filename must be specified (/out <file>)");
+
+ TargetOS targetOS;
+#if FXCORE
+ // We could offer this as a command line option, but then we also need to
+ // load a different RyuJIT, so this is a future nice to have...
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+ targetOS = TargetOS.Windows;
+ else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
+ targetOS = TargetOS.Linux;
+ else
+ throw new NotImplementedException();
+#else
+ targetOS = TargetOS.Windows;
+#endif
+
+ _compilerTypeSystemContext = new CompilerTypeSystemContext(new TargetDetails(TargetArchitecture.X64, targetOS));
+ _compilerTypeSystemContext.InputFilePaths = _inputFilePaths;
+ _compilerTypeSystemContext.ReferenceFilePaths = _referenceFilePaths;
+
+ _compilerTypeSystemContext.SetSystemModule(_compilerTypeSystemContext.GetModuleForSimpleName("System.Private.CoreLib"));
+
+ // For now, we can do single file compilation only
+ // TODO: Multifile
+ SingleFileCompilation();
+
+ return 0;
+ }
+
+ static int Main(string[] args)
+ {
+#if DEBUG
+ return new Program().Run(args);
+#else
+ try
+ {
+ return new Program().Run(args);
+ }
+ catch (Exception e)
+ {
+ Console.Error.WriteLine("Error: " + e.Message);
+ return 1;
+ }
+#endif
+ }
+ }
+}
diff --git a/src/ILCompiler/src/project.json b/src/ILCompiler/src/project.json
new file mode 100644
index 000000000..f9ec2ebe0
--- /dev/null
+++ b/src/ILCompiler/src/project.json
@@ -0,0 +1,28 @@
+{
+ "dependencies": {
+ "System.Runtime": "4.0.20",
+ "System.Resources.ResourceManager": "4.0.0",
+ "System.Reflection.Primitives": "4.0.0",
+ "System.Diagnostics.Debug": "4.0.10",
+ "System.IO": "4.0.10",
+ "System.IO.FileSystem": "4.0.0",
+ "System.Collections": "4.0.10",
+ "System.Text.Encoding": "4.0.10",
+ "System.Runtime.InteropServices": "4.0.20",
+ "System.Reflection": "4.0.0",
+ "System.Runtime.Extensions": "4.0.10",
+ "System.Threading": "4.0.10",
+ "System.Text.Encoding.Extensions": "4.0.10",
+ "System.Reflection.Extensions": "4.0.0",
+ "System.Console": "4.0.0-beta-23419",
+ "System.AppContext": "4.0.0",
+ "System.Collections.Immutable": "1.1.37",
+ "System.Reflection.Metadata": "1.0.22",
+ "System.Runtime.InteropServices.RuntimeInformation": "4.0.0-beta-23409"
+ },
+ "frameworks": {
+ "dotnet": {
+ "imports": "portable-net452"
+ }
+ }
+} \ No newline at end of file