This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
/
Copy pathCreateRuntimeRootILLinkDescriptorFile.targets
40 lines (37 loc) · 3.04 KB
/
CreateRuntimeRootILLinkDescriptorFile.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CompileDependsOn>_CreateILLinkRuntimeRootDescriptorFile;$(CompileDependsOn)</CompileDependsOn>
</PropertyGroup>
<PropertyGroup>
<_ILLinkRuntimeRootDescriptorFileName Condition=" '$(_ILLinkRuntimeRootDescriptorFileName)' == '' ">System.Private.CoreLib.xml</_ILLinkRuntimeRootDescriptorFileName>
<_ILLinkRuntimeRootDescriptorFilePath Condition=" '$(_ILLinkRuntimeRootDescriptorFilePath)' == '' ">$(IntermediateOutputPath)$(_ILLinkRuntimeRootDescriptorFileName)</_ILLinkRuntimeRootDescriptorFilePath>
<_NamespaceFilePath Condition=" '$(_NamespaceFilePath)' == '' ">$(MSBuildThisFileDirectory)..\vm\namespace.h</_NamespaceFilePath>
<_MscorlibFilePath Condition=" '$(_MscorlibFilePath)' == '' ">$(MSBuildThisFileDirectory)..\vm\mscorlib.h</_MscorlibFilePath>
<_CortypeFilePath Condition=" '$(_CortypeFilePath)' == '' ">$(MSBuildThisFileDirectory)..\inc\cortypeinfo.h</_CortypeFilePath>
<_RexcepFilePath Condition=" '$(_RexcepFilePath)' == '' ">$(MSBuildThisFileDirectory)..\vm\rexcep.h</_RexcepFilePath>
<_ILLinkTrimXmlFilePath Condition=" '$(_ILLinkTrimXmlFilePath)' == '' ">$(MSBuildThisFileDirectory)ILLinkTrim.xml</_ILLinkTrimXmlFilePath>
<_ILLinkTasksToolsDir>$(PkgILLink_Tasks)/tools</_ILLinkTasksToolsDir>
<_ILLinkTasksDir>$(_ILLinkTasksToolsDir)/net472/</_ILLinkTasksDir>
<_ILLinkTasksDir Condition="'$(MSBuildRuntimeType)' == 'Core'">$(_ILLinkTasksToolsDir)/netcoreapp2.0/</_ILLinkTasksDir>
</PropertyGroup>
<!--
Generates the xml root descriptor file for ILLink. The file contains roots required by the runtime.
This gets generated by mono IL linker which lives in https://github.com/mono/linker
If it fails, it'll spit out some cryptic error messages that's hard to debug.
You can debug it by setting /maxcpucount:1 in the msbuild command to force it to not spawn up a bunch
of child processes, and attach a debugger to msbuild. After that you can set a bp on the exception
you are seeing.
-->
<UsingTask TaskName="CreateRuntimeRootILLinkDescriptorFile" AssemblyFile="$(_ILLinkTasksDir)ILLink.Tasks.dll" />
<Target Name="_CreateILLinkRuntimeRootDescriptorFile"
Inputs="$(_NamespaceFilePath);$(_MscorlibFilePath);$(_CortypeFilePath);$(_RexcepFilePath);$(_ILLinkTrimXmlFilePath)"
Outputs="$(_ILLinkRuntimeRootDescriptorFilePath)">
<Message Text="Generating ILLink roots file: $(_ILLinkRuntimeRootDescriptorFilePath)" />
<CreateRuntimeRootILLinkDescriptorFile NamespaceFilePath="$(_NamespaceFilePath)"
MscorlibFilePath="$(_MscorlibFilePath)"
CortypeFilePath="$(_CortypeFilePath)"
RexcepFilePath="$(_RexcepFilePath)"
ILLinkTrimXmlFilePath="$(_ILLinkTrimXmlFilePath)"
RuntimeRootDescriptorFilePath="$(_ILLinkRuntimeRootDescriptorFilePath)" />
</Target>
</Project>