-
Notifications
You must be signed in to change notification settings - Fork 379
Adding basic support for an ilproj sdk. #317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <TargetFrameworks>netstandard1.0</TargetFrameworks> | ||
| <ExcludeFromSourceBuild>false</ExcludeFromSourceBuild> | ||
| <IsPackable>true</IsPackable> | ||
| <Description>This package provides support for building IL projects.</Description> | ||
| <DevelopmentDependency>true</DevelopmentDependency> | ||
| <EnableDefaultNoneItems>false</EnableDefaultNoneItems> | ||
| <EnableGeneratedPackageContent>false</EnableGeneratedPackageContent> | ||
| <IncludePublishOutput>false</IncludePublishOutput> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <None Include="sdk/*.*" Pack="true" PackagePath="sdk/%(Filename)%(Extension)" /> | ||
| <None Include="build/*.*" Pack="true" PackagePath="build/%(Filename)%(Extension)" /> | ||
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
Sorry, something went wrong. |
||
| </ItemGroup> | ||
|
|
||
| <Import Project="$(RepoRoot)eng\Sdk.targets" /> | ||
|
|
||
| </Project> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
Sorry, something went wrong. |
||
| <!-- | ||
| *********************************************************************************************** | ||
| Microsoft.NET.Sdk.IL.props | ||
|
|
||
| WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have | ||
| created a backup copy. Incorrect changes to this file will make it | ||
| impossible to load or build your projects from the command-line or the IDE. | ||
|
|
||
| Copyright (c) .NET Foundation. All rights reserved. | ||
| *********************************************************************************************** | ||
| --> | ||
| <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
|
||
| <PropertyGroup> | ||
| <MSBuildAllProjects>$(MSBuildThisFileFullPath);$(MSBuildAllProjects)</MSBuildAllProjects> | ||
| </PropertyGroup> | ||
|
|
||
| </Project> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <!-- | ||
| *********************************************************************************************** | ||
| Microsoft.NET.Sdk.IL.targets | ||
|
|
||
| WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have | ||
| created a backup copy. Incorrect changes to this file will make it | ||
| impossible to load or build your projects from the command-line or the IDE. | ||
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
Sorry, something went wrong. |
||
|
|
||
| Copyright (c) .NET Foundation. All rights reserved. | ||
| *********************************************************************************************** | ||
| --> | ||
| <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
|
||
| <PropertyGroup> | ||
| <MSBuildAllProjects>$(MSBuildThisFileFullPath);$(MSBuildAllProjects)</MSBuildAllProjects> | ||
| <DefaultLanguageSourceExtension>.il</DefaultLanguageSourceExtension> | ||
| <Language>IL</Language> | ||
| <TargetRuntime>Managed</TargetRuntime> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup> | ||
| <_OSPlatform Condition="$([MSBuild]::IsOSPlatform('windows'))">win</_OSPlatform> | ||
| <_OSPlatform Condition="$([MSBuild]::IsOSPlatform('linux'))">linux</_OSPlatform> | ||
| <_OSPlatform Condition="$([MSBuild]::IsOSPlatform('osx'))">osx</_OSPlatform> | ||
| <_OSArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)</_OSArchitecture> | ||
|
|
||
| <MicrosoftNetCoreIlasmPackageRuntimeId Condition="'$(MicrosoftNetCoreIlasmPackageRuntimeId)' == ''">$(_OSPlatform)-$(_OSArchitecture.ToLower())</MicrosoftNetCoreIlasmPackageRuntimeId> | ||
| <MicrosoftNetCoreIlasmPackageVersion Condition="'$(MicrosoftNetCoreIlasmPackageVersion)' == ''">2.0.8</MicrosoftNetCoreIlasmPackageVersion> | ||
| <MicrosoftNetCoreIlasmPackageName>runtime.$(MicrosoftNetCoreIlasmPackageRuntimeId).microsoft.netcore.ilasm</MicrosoftNetCoreIlasmPackageName> | ||
| <MicrosoftNetCoreRuntimeCoreClrPackageName>runtime.$(MicrosoftNetCoreIlasmPackageRuntimeId).microsoft.netcore.runtime.coreclr</MicrosoftNetCoreRuntimeCoreClrPackageName> | ||
|
|
||
| <ToolsDir Condition="'$(ToolsDir)' == ''">$([System.IO.Path]::Combine($([System.IO.Path]::GetTempPath()), $([System.IO.Path]::GetRandomFileName())))</ToolsDir> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="$(MicrosoftNetCoreIlasmPackageName)" Version="$(MicrosoftNetCoreIlasmPackageVersion)" PrivateAssets="all" IsImplicitlyDefined="true" /> | ||
| <PackageReference Include="$(MicrosoftNetCoreRuntimeCoreClrPackageName)" Version="$(MicrosoftNetCoreIlasmPackageVersion)" PrivateAssets="all" IsImplicitlyDefined="true" /> | ||
| </ItemGroup> | ||
|
|
||
| <PropertyGroup> | ||
| <CreateManifestResourceNamesDependsOn></CreateManifestResourceNamesDependsOn> | ||
| </PropertyGroup> | ||
|
|
||
| <Target Name="CreateManifestResourceNames" | ||
| Condition="'@(EmbeddedResource)' != ''" | ||
| DependsOnTargets="$(CreateManifestResourceNamesDependsOn)"> | ||
| <!-- Required by Microsoft.Common.targets --> | ||
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
Sorry, something went wrong. |
||
| </Target> | ||
|
|
||
| <Target Name="CoreCompile" | ||
| Inputs="$(MSBuildAllProjects); | ||
| @(Compile)" | ||
| Outputs="@(IntermediateAssembly)" | ||
| Returns="" | ||
| DependsOnTargets="$(CoreCompileDependsOn)"> | ||
| <ItemGroup> | ||
| <_IlasmSourceFiles Include="$(NuGetPackageRoot)\$(MicrosoftNetCoreIlasmPackageName)\$(MicrosoftNetCoreIlasmPackageVersion)\runtimes\$(MicrosoftNetCoreIlasmPackageRuntimeId)\native\**\*" /> | ||
| <_IlasmSourceFiles Include="$(NuGetPackageRoot)\$(MicrosoftNetCoreRuntimeCoreClrPackageName)\$(MicrosoftNetCoreIlasmPackageVersion)\runtimes\$(MicrosoftNetCoreIlasmPackageRuntimeId)\native\**\*" /> | ||
| </ItemGroup> | ||
|
|
||
| <PropertyGroup> | ||
| <_IlasmDir>$(ToolsDir)\ilasm</_IlasmDir> | ||
|
|
||
| <_OutputTypeArgument Condition="'$(OutputType)' == 'Library'">-DLL</_OutputTypeArgument> | ||
| <_OutputTypeArgument Condition="'$(OutputType)' == 'Exe'">-EXE</_OutputTypeArgument> | ||
|
|
||
| <_KeyFileArgument Condition="'$(KeyOriginatorFile)' != ''">-KEY=$(KeyOriginatorFile)</_KeyFileArgument> | ||
|
|
||
| <_IlasmSwitches>-QUIET -NOLOGO</_IlasmSwitches> | ||
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
Sorry, something went wrong. |
||
| <_IlasmSwitches Condition="'$(FoldIdenticalMethods)' == 'True'">$(_IlasmSwitches) -FOLD</_IlasmSwitches> | ||
| <_IlasmSwitches Condition="'$(SizeOfStackReserve)' != ''">$(_IlasmSwitches) -STACK=$(SizeOfStackReserve)</_IlasmSwitches> | ||
| <_IlasmSwitches Condition="'$(DebugType)' == 'Full'">$(_IlasmSwitches) -DEBUG</_IlasmSwitches> | ||
| <_IlasmSwitches Condition="'$(DebugType)' == 'Impl'">$(_IlasmSwitches) -DEBUG=IMPL</_IlasmSwitches> | ||
| <_IlasmSwitches Condition="'$(DebugType)' == 'PdbOnly'">$(_IlasmSwitches) -DEBUG=OPT</_IlasmSwitches> | ||
| <_IlasmSwitches Condition="'$(Optimize)' == 'True'">$(_IlasmSwitches) -OPTIMIZE</_IlasmSwitches> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- Having to copy these binaries is really inefficient. https://github.com/dotnet/coreclr/issues/18892 tracks making the ilasm tool self-contained --> | ||
| <MakeDir Directories="$(_IlasmDir)" /> | ||
| <Copy DestinationFolder="$(_IlasmDir)" SourceFiles="@(_IlasmSourceFiles)" /> | ||
|
|
||
| <Exec Command="$(_IlasmDir)\ilasm $(_IlasmSwitches) $(_OutputTypeArgument) $(IlasmFlags) -OUTPUT=@(IntermediateAssembly) $(_KeyFileArgument) @(Compile, ' ')"> | ||
| <Output TaskParameter="ExitCode" PropertyName="_ILAsmExitCode" /> | ||
| </Exec> | ||
|
|
||
| <Error Text="ILAsm failed" Condition="'$(_ILAsmExitCode)' != '0'" /> | ||
|
|
||
| <CallTarget Targets="$(TargetsTriggeredByCompilation)" Condition="'$(TargetsTriggeredByCompilation)' != ''"/> | ||
| </Target> | ||
|
|
||
| <Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" /> | ||
|
|
||
| </Project> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <!-- | ||
| *********************************************************************************************** | ||
| Sdk.props | ||
|
|
||
| WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have | ||
| created a backup copy. Incorrect changes to this file will make it | ||
| impossible to load or build your projects from the command-line or the IDE. | ||
|
|
||
| Copyright (c) .NET Foundation. All rights reserved. | ||
| *********************************************************************************************** | ||
| --> | ||
| <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
|
||
| <PropertyGroup> | ||
| <MSBuildAllProjects>$(MSBuildThisFileFullPath);$(MSBuildAllProjects)</MSBuildAllProjects> | ||
| </PropertyGroup> | ||
|
|
||
| <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" /> | ||
| <Import Project="$(MSBuildThisFileDirectory)..\build\Microsoft.NET.Sdk.IL.props" Condition="'$(MSBuildProjectExtension)' == '.ilproj'" /> | ||
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
Sorry, something went wrong. |
||
|
|
||
| </Project> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <!-- | ||
| *********************************************************************************************** | ||
| Sdk.targets | ||
|
|
||
| WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have | ||
| created a backup copy. Incorrect changes to this file will make it | ||
| impossible to load or build your projects from the command-line or the IDE. | ||
|
|
||
| Copyright (c) .NET Foundation. All rights reserved. | ||
| *********************************************************************************************** | ||
| --> | ||
| <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
|
||
| <PropertyGroup> | ||
| <MSBuildAllProjects>$(MSBuildThisFileFullPath);$(MSBuildAllProjects)</MSBuildAllProjects> | ||
| <LanguageTargets Condition="'$(MSBuildProjectExtension)' == '.ilproj'">$(MSBuildThisFileDirectory)..\build\Microsoft.NET.Sdk.IL.targets</LanguageTargets> | ||
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
Sorry, something went wrong. |
||
| </PropertyGroup> | ||
|
|
||
| <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" /> | ||
|
|
||
| </Project> | ||
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.