diff options
author | Sven Boemer <sbomer@gmail.com> | 2016-12-14 20:48:14 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2017-05-10 16:07:24 +0300 |
commit | c2bd71d57a62f36a04296f02ea2c48ad08473e1b (patch) | |
tree | 3352f08b6721432ccb05bd0b4e6248a7c5d72723 /linker | |
parent | 5fa598a5d5fdd0e769495717626db9f20852d3eb (diff) |
Add .NET Core SDK tasks and targets
This adds a project that produces the NuGet package ILLink.Tasks,
which contains MSBuild tasks and targets that integrate the linker
with the .NET Core SDK.
Make linker a part of the publish pipeline
We want to introduce a target that runs the linker during the
publish pipeline. The publish pipeline has a target called
ComputeFilesToPublish, which computes the ItemGroup
ResolvedFileToPublish. To extend this target, we have two options:
1. Insert a target before ComputeFilesToPublish. Our target
would rewrite the relevant inputs (@(IntermediateAssembly) and
@(ResolvedAssembliesToPublish)). This lets ComputeFilesToPublish
be ignorant of the linker, but changes the meaning of
IntermediateAssembly and ResolvedAssembliesToPublish.
2. Insert a target after ComputeFilesToPublish. Our target would
pick apart ResolvedFileToPublish, pass some of the resolved
files to the linker, and reconstruct ResolvedFileToPublish to
include the linked assemblies. To pick apart
ComputeFilesToPublish, we break it back down into
IntermediateAssembly and ResolvedAssembliesToPublish. This
avoids changing the meaning of IntermediateAssembly and
ResolvedAssembliesToPublish, but makes it difficult for future
extensions to modify ResolvedFileToPublish (since they will need
to rely on the order in which AfterTargets run).
We'll go with option 1, for simplicity. These itemgroups should
be rewritten even during incremental build, so that publish
takes assemblies from the linked directory.
This commit also includes response to some PR feedback:
- Rename link task from "Link" to "ILLink"
- Compute excluded roots from a list of packages
- Make most targets and itemgroups private
- Turn off the size comparison report by default
- Note behavior of roots vs xml files in comment
This adds simple integration tests for:
- helloworld
- musicstore
- webapi
Each integration test will set up a project (by doing a git clone in
the case of musicstore), add the linker package (which is assumed to
have been built locally), and run the linker.
Diffstat (limited to 'linker')
-rw-r--r-- | linker/Mono.Linker.csproj | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/linker/Mono.Linker.csproj b/linker/Mono.Linker.csproj index c010a7850..3964313e8 100644 --- a/linker/Mono.Linker.csproj +++ b/linker/Mono.Linker.csproj @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0"> <!-- TODO: Remove this workaround once supported. @@ -53,7 +53,7 @@ <Target Name="AfterBuild"> </Target> --> - <ItemGroup Condition=" ! $(Configuration.StartsWith('netcore')) "> + <ItemGroup Condition=" ! $(NetCoreBuild) "> <Reference Include="System" /> <Reference Include="System.Core" /> <Reference Include="System.Xml" /> @@ -130,4 +130,4 @@ <Name>Mono.Cecil.Pdb</Name> </ProjectReference> </ItemGroup> -</Project>
\ No newline at end of file +</Project> |