You've already forked linux-packaging-mono
Imported Upstream version 5.4.0.199
Former-commit-id: f4d318e4b2f128fa9f4d31b37bb3839a3fc0dfb2
This commit is contained in:
parent
536cd135cc
commit
5924117973
@@ -1,7 +1,11 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<PropertyGroup>
|
||||
<LinkTaskDllPath Condition=" '$(LinkTaskDllPath)' == '' ">$(MSBuildThisFileDirectory)../tools/$(TargetFramework)/ILLink.Tasks.dll</LinkTaskDllPath>
|
||||
<_LinkTaskDirectoryRoot>$(MSBuildThisFileDirectory)../tools/</_LinkTaskDirectoryRoot>
|
||||
<_LinkTaskTFM Condition=" '$(MSBuildRuntimeType)' == 'Core' ">netcoreapp2.0</_LinkTaskTFM>
|
||||
<_LinkTaskTFM Condition=" '$(_LinkTaskTFM)' == '' ">net46</_LinkTaskTFM>
|
||||
<_LinkTaskDirectory>$(_LinkTaskDirectoryRoot)$(_LinkTaskTFM)/</_LinkTaskDirectory>
|
||||
<LinkTaskDllPath Condition=" '$(LinkTaskDllPath)' == '' ">$(_LinkTaskDirectory)ILLink.Tasks.dll</LinkTaskDllPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
@@ -54,10 +58,15 @@
|
||||
which computes the ItemGroup ResolvedFileToPublish. To extend
|
||||
this target, we insert a target before
|
||||
ComputeFilesToPublish. Our target rewrites the relevant inputs
|
||||
(@(IntermediateAssembly) and
|
||||
@(ResolvedAssembliesToPublish)). This lets ComputeFilesToPublish
|
||||
be ignorant of the linker, but changes the meaning of
|
||||
IntermediateAssembly and ResolvedAssembliesToPublish.
|
||||
(@(IntermediateAssembly), @(ResolvedAssembliesToPublish)). This
|
||||
lets ComputeFilesToPublish be ignorant of the linker, but
|
||||
changes the meaning of IntermediateAssembly and
|
||||
ResolvedAssembliesToPublish.
|
||||
|
||||
To include linked pdbs in the publish output, we also rewrite
|
||||
the ComputeFilesToPublish input
|
||||
@(_DebugSymbolsIntermediatePath). Note that this is a private
|
||||
itemgroup, so relying on this is not ideal.
|
||||
-->
|
||||
<!-- DependsOnTargets here doesn't include the targets that compute
|
||||
ResolvedAssembliesToPublish or IntermediateAssembly, because
|
||||
@@ -82,6 +91,13 @@
|
||||
<IntermediateAssembly Remove="@(IntermediateAssembly)" />
|
||||
<IntermediateAssembly Include="@(_LinkedIntermediateAssembly)" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Rewrite _DebugSymbolsIntermediatePath, which is an input to
|
||||
ComputeFilesToPublish. -->
|
||||
<ItemGroup>
|
||||
<_DebugSymbolsIntermediatePath Remove="@(_DebugSymbolsIntermediatePath)" Condition=" '$(_DebugSymbolsProduced)' == 'true' " />
|
||||
<_DebugSymbolsIntermediatePath Include="@(_LinkedDebugSymbols)" Condition=" '$(_DebugSymbolsProduced)' == 'true' " />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
|
||||
@@ -100,10 +116,11 @@
|
||||
</Target>
|
||||
|
||||
|
||||
<!-- Computes _LinkedResolvedAssemblies and
|
||||
_LinkedIntermediateAssembly. _LinkedResolvedAssemblies needs to
|
||||
keep metadata from _ManagedResolvedAssembliesToPublish, since
|
||||
this is used by ComputeFilesToPublish. -->
|
||||
<!-- Computes _LinkedResolvedAssemblies,
|
||||
_LinkedIntermediateAssembly, and
|
||||
_LinkedDebugSymbols. _LinkedResolvedAssemblies needs to keep
|
||||
metadata from _ManagedResolvedAssembliesToPublish, since this
|
||||
is used by ComputeFilesToPublish. -->
|
||||
<Target Name="_ComputeLinkedAssemblies"
|
||||
DependsOnTargets="_ComputeManagedResolvedAssembliesToPublish;ILLink">
|
||||
<ItemGroup>
|
||||
@@ -115,6 +132,13 @@
|
||||
<__LinkedIntermediateAssembly Include="@(IntermediateAssembly->'$(IntermediateLinkDir)/%(Filename)%(Extension)')" />
|
||||
<_LinkedIntermediateAssembly Include="@(__LinkedIntermediateAssembly)" Condition="Exists('%(Identity)')" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<__LinkedDebugSymbols Include="@(_DebugSymbolsIntermediatePath->'$(IntermediateLinkDir)/%(Filename)%(Extension)')"
|
||||
Condition=" '$(_DebugSymbolsProduced)' == 'true' " />
|
||||
<_LinkedDebugSymbols Include="@(__LinkedDebugSymbols)"
|
||||
Condition="Exists('%(Identity)') And '$(_DebugSymbolsProduced)' == 'true' " />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
|
||||
@@ -132,7 +156,7 @@
|
||||
the future we will want to generate these depending on the
|
||||
scenario in which the linker is invoked. -->
|
||||
<PropertyGroup>
|
||||
<ExtraLinkerArgs Condition=" '$(ExtraLinkerArgs)' == '' ">-t -c link -l none</ExtraLinkerArgs>
|
||||
<ExtraLinkerArgs Condition=" '$(ExtraLinkerArgs)' == '' ">-t -c link -l none -b true</ExtraLinkerArgs>
|
||||
</PropertyGroup>
|
||||
<ILLink AssemblyPaths="@(_ManagedAssembliesToLink)"
|
||||
RootAssemblyNames="@(LinkerRootAssemblies)"
|
||||
@@ -189,6 +213,11 @@
|
||||
<ItemGroup>
|
||||
<_ManagedResolvedAssembliesToPublish Remove="@(_ManagedResolvedAssembliesToPublish->WithMetadataValue('Filename', 'System.Private.CoreLib.ni'))" />
|
||||
</ItemGroup>
|
||||
<!-- Some of the managed dlls are satellite assemblies containing
|
||||
binary resources that we don't want to link. -->
|
||||
<ItemGroup>
|
||||
<_ManagedResolvedAssembliesToPublish Remove="@(_ManagedResolvedAssembliesToPublish->WithMetadataValue('AssetType', 'resources'))" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user