forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCreateRuntimeRootILLinkDescriptorFile.targets
More file actions
61 lines (53 loc) · 3.91 KB
/
CreateRuntimeRootILLinkDescriptorFile.targets
File metadata and controls
61 lines (53 loc) · 3.91 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CompileDependsOn>_CreateILLinkRuntimeRootDescriptorFile;$(CompileDependsOn)</CompileDependsOn>
</PropertyGroup>
<PropertyGroup>
<_ILLinkRuntimeRootDescriptorFilePath>$(ILLinkDescriptorsXml)</_ILLinkRuntimeRootDescriptorFilePath>
<_NamespaceFilePath Condition=" '$(_NamespaceFilePath)' == '' ">$(MSBuildThisFileDirectory)..\vm\namespace.h</_NamespaceFilePath>
<_MscorlibFilePath Condition=" '$(_MscorlibFilePath)' == '' ">$(MSBuildThisFileDirectory)..\vm\corelib.h</_MscorlibFilePath>
<_CortypeFilePath Condition=" '$(_CortypeFilePath)' == '' ">$(MSBuildThisFileDirectory)..\inc\cortypeinfo.h</_CortypeFilePath>
<_RexcepFilePath Condition=" '$(_RexcepFilePath)' == '' ">$(MSBuildThisFileDirectory)..\vm\rexcep.h</_RexcepFilePath>
<_ILLinkDescriptorsIntermediatePath>$(IntermediateOutputPath)ILLink.Descriptors.Combined.xml</_ILLinkDescriptorsIntermediatePath>
</PropertyGroup>
<ItemGroup>
<_ILLinkDescriptorsFilePaths Include="$(ILLinkDirectory)ILLink.Descriptors.Shared.xml" />
<_ILLinkDescriptorsFilePaths Condition="'$(TargetsWindows)' == 'true'" Include="$(ILLinkDirectory)ILLink.Descriptors.Windows.xml" />
<_ILLinkDescriptorsFilePaths Include="$(ILLinkDirectory)ILLink.Descriptors.Debug.xml"
Condition="'$(Configuration)' == 'Debug' or '$(Configuration)' == 'Checked'" />
<_ILLinkDescriptorsFilePaths Include="$(CoreLibSharedDir)ILLink\ILLink.Descriptors.Shared.xml" />
<_ILLinkDescriptorsFilePaths Include="$(CoreLibSharedDir)ILLink\ILLink.Descriptors.EventSource.xml" />
</ItemGroup>
<!--
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="$(ILLinkTasksAssembly)" Condition="'$(ILLinkTasksAssembly)' != ''" />
<Target Name="_CreateILLinkRuntimeRootDescriptorFile"
DependsOnTargets="_CombineILLinkTrimXmlFilePaths"
Inputs="$(_NamespaceFilePath);$(_MscorlibFilePath);$(_CortypeFilePath);$(_RexcepFilePath);$(_ILLinkDescriptorsIntermediatePath)"
Outputs="$(_ILLinkRuntimeRootDescriptorFilePath)">
<Message Text="Generating ILLink roots file: $(_ILLinkRuntimeRootDescriptorFilePath)" />
<CreateRuntimeRootILLinkDescriptorFile NamespaceFilePath="$(_NamespaceFilePath)"
MscorlibFilePath="$(_MscorlibFilePath)"
CortypeFilePath="$(_CortypeFilePath)"
RexcepFilePath="$(_RexcepFilePath)"
ILLinkTrimXmlFilePath="$(_ILLinkDescriptorsIntermediatePath)"
DefineConstants="$(DefineConstants);FOR_ILLINK"
RuntimeRootDescriptorFilePath="$(_ILLinkRuntimeRootDescriptorFilePath)" />
</Target>
<UsingTask TaskName="CombineLinkerXmlFiles" AssemblyFile="$(ILLinkTasksAssembly)" Condition="'$(ILLinkTasksAssembly)' != ''" />
<Target Name="_CombineILLinkTrimXmlFilePaths"
Inputs="@(_ILLinkDescriptorsFilePaths)"
Outputs="$(_ILLinkDescriptorsIntermediatePath)">
<CombineLinkerXmlFiles LinkerXmlFiles="@(_ILLinkDescriptorsFilePaths)"
CombinedLinkerXmlFile="$(_ILLinkDescriptorsIntermediatePath)" />
<ItemGroup>
<FileWrites Include="$(_ILLinkDescriptorsIntermediatePath)" />
</ItemGroup>
</Target>
</Project>