|
1 |
| -<Project Sdk="Microsoft.Build.NoTargets"> |
| 1 | +<Project Sdk="Microsoft.Build.Traversal"> |
2 | 2 |
|
3 | 3 | <PropertyGroup>
|
4 | 4 | <TargetFramework>$(NetCoreAppCurrent)-$(TargetOS)</TargetFramework>
|
5 | 5 | <!-- By default, build the NetCoreAppCurrent vertical only. -->
|
6 | 6 | <BuildTargetFramework Condition="'$(BuildAllConfigurations)' != 'true'">$(NetCoreAppCurrent)</BuildTargetFramework>
|
7 |
| - <!-- Import the illink file which contains some of the logic required to illink the out-of-band assemblies. --> |
8 |
| - <ExplicitlyImportCustomILLinkTargets Condition="'$(BuildTargetFramework)' == '$(NetCoreAppCurrent)' or '$(BuildTargetFramework)' == ''">true</ExplicitlyImportCustomILLinkTargets> |
9 | 7 | </PropertyGroup>
|
10 | 8 |
|
11 | 9 | <ItemGroup Condition="'$(BuildTargetFramework)' == '$(NetCoreAppCurrent)' or '$(BuildTargetFramework)' == ''">
|
12 |
| - <ProjectReference Include="sfx-src.proj" OutputItemType="SharedFrameworkAssembly" /> |
13 |
| - <ProjectReference Include="oob-src.proj" OutputItemType="OOBAssembly" /> |
| 10 | + <ProjectReference Include="sfx-src.proj" /> |
| 11 | + <ProjectReference Include="oob-src.proj" /> |
14 | 12 |
|
15 | 13 | <ProjectReference Include="apicompat\ApiCompat.proj"
|
16 | 14 | Condition="'$(DotNetBuildSourceOnly)' != 'true' and '$(ApiCompatValidateAssemblies)' != 'false'" />
|
| 15 | + |
| 16 | + <ProjectReference Include="oob-trim.proj" /> |
17 | 17 | </ItemGroup>
|
18 | 18 |
|
19 | 19 | <ItemGroup Condition="'$(BuildTargetFramework)' != '$(NetCoreAppCurrent)' or '$(BuildTargetFramework)' == ''">
|
|
22 | 22 | <ProjectReference Include="oob-gen.proj" Condition="'$(DotNetBuildSourceOnly)' != 'true'" />
|
23 | 23 | </ItemGroup>
|
24 | 24 |
|
25 |
| - <Target Name="GetTrimOOBAssembliesInputs" |
26 |
| - DependsOnTargets="ResolveProjectReferences"> |
27 |
| - <PropertyGroup> |
28 |
| - <OOBAssembliesTrimDir>$([MSBuild]::NormalizeDirectory('$(IntermediateOutputPath)', 'illink-$(TargetArchitecture)'))</OOBAssembliesTrimDir> |
29 |
| - <OOBAssembliesTrimMarkerFile>$(OOBAssembliesTrimDir)marker.txt</OOBAssembliesTrimMarkerFile> |
30 |
| - </PropertyGroup> |
31 |
| - |
32 |
| - <ItemGroup> |
33 |
| - <OOBLibrarySuppressionsXml Include="@(OOBAssembly->Metadata('ILLinkSuppressionsXmls'))" /> |
34 |
| - |
35 |
| - <OOBAssemblyToTrim Include="@(OOBAssembly->WithMetadataValue('IsTrimmable', 'true'))" /> |
36 |
| - <OOBAssemblyReference Include="@(OOBAssembly->WithMetadataValue('IsTrimmable', 'false')); |
37 |
| - @(SharedFrameworkAssembly)" /> |
38 |
| - </ItemGroup> |
39 |
| - </Target> |
40 |
| - |
41 |
| - <Target Name="TrimOOBAssemblies" |
42 |
| - AfterTargets="Build" |
43 |
| - Condition="'@(OOBAssembly)' != ''" |
44 |
| - DependsOnTargets="GetTrimOOBAssembliesInputs;PrepareForAssembliesTrim" |
45 |
| - Inputs="$(ILLinkTasksAssembly);@(OOBAssemblyToTrim);@(OOBAssemblyReference);@(OOBLibrarySuppressionsXml)" |
46 |
| - Outputs="$(OOBAssembliesTrimMarkerFile)"> |
47 |
| - <Message Text="$(MSBuildProjectName) -> Trimming $(OutputRID) out-of-band assemblies with ILLinker..." Importance="high" /> |
48 |
| - |
49 |
| - <PropertyGroup> |
50 |
| - <OOBILLinkArgs>$(ILLinkArgs)</OOBILLinkArgs> |
51 |
| - <!-- Unnecessary suppressions - disable for now since we didn't clean the runtime yet --> |
52 |
| - <OOBILLinkArgs>$(ILLinkArgs) --nowarn IL2121</OOBILLinkArgs> |
53 |
| - <OOBILLinkArgs Condition="'@(OOBLibrarySuppressionsXml)' != ''" >$(OOBILLinkArgs) --link-attributes "@(OOBLibrarySuppressionsXml->'%(FullPath)', '" --link-attributes "')"</OOBILLinkArgs> |
54 |
| - </PropertyGroup> |
55 |
| - |
56 |
| - <MakeDir Directories="$(OOBAssembliesTrimDir)" /> |
57 |
| - <ILLink AssemblyPaths="" |
58 |
| - RootAssemblyNames="@(OOBAssemblyToTrim)" |
59 |
| - ReferenceAssemblyPaths="@(OOBAssemblyReference)" |
60 |
| - OutputDirectory="$(OOBAssembliesTrimDir)" |
61 |
| - ExtraArgs="$(OOBILLinkArgs)" |
62 |
| - ToolExe="$(_DotNetHostFileName)" |
63 |
| - ToolPath="$(_DotNetHostDirectory)" /> |
64 |
| - |
65 |
| - <!-- Create a marker file which serves as the target's output to enable incremental builds. --> |
66 |
| - <Touch Files="$(OOBAssembliesTrimMarkerFile)" |
67 |
| - AlwaysCreate="true" /> |
68 |
| - </Target> |
69 |
| - |
70 | 25 | <Target Name="SetAzureDevOpsVariableForBuiltPackages"
|
71 | 26 | Condition="'$(ContinuousIntegrationBuild)' == 'true'"
|
72 | 27 | AfterTargets="Build;Pack">
|
|
0 commit comments