-
Notifications
You must be signed in to change notification settings - Fork 4.7k
/
Microsoft.NETCore.App.Runtime.props
180 lines (161 loc) · 10.1 KB
/
Microsoft.NETCore.App.Runtime.props
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<Project>
<PropertyGroup>
<IncludeFallbacksInDepsFile>true</IncludeFallbacksInDepsFile>
<GetSharedFrameworkFilesForReadyToRunDependsOn>
AddRuntimeFilesToPackage;
AddFrameworkFilesToPackage
</GetSharedFrameworkFilesForReadyToRunDependsOn>
<PublishReadyToRun Condition="'$(RuntimeFlavor)' != 'Mono'">true</PublishReadyToRun>
<PublishReadyToRun Condition="'$(RuntimeFlavor)' == 'Mono'">false</PublishReadyToRun>
<!-- Disable crossgen on NetBSD, illumos and Solaris for now. This can be revisited when we have full support. -->
<PublishReadyToRun Condition="'$(TargetOS)'=='NetBSD' Or '$(TargetOS)'=='illumos' Or '$(TargetOS)'=='Solaris'">false</PublishReadyToRun>
<!-- Disable crossgen on FreeBSD when cross building from Linux. -->
<PublishReadyToRun Condition="'$(TargetOS)'=='FreeBSD' and '$(CrossBuild)'=='true'">false</PublishReadyToRun>
<!-- These components are installed by the root shared framework, but not others. -->
<IncludeWerRelatedKeys>true</IncludeWerRelatedKeys>
<IncludeBreadcrumbStoreFolder>true</IncludeBreadcrumbStoreFolder>
<MacOSPackageDescription>The .NET Shared Framework</MacOSPackageDescription>
</PropertyGroup>
<PropertyGroup Condition="'$(RuntimeFlavor)' == 'Mono' and '$(RuntimeFlavor)' != '$(PrimaryRuntimeFlavor)'">
<RuntimeSpecificFrameworkSuffix>Mono</RuntimeSpecificFrameworkSuffix>
</PropertyGroup>
<PropertyGroup Condition="'$(MonoEnableLLVM)' == 'true' and '$(RuntimeFlavor)' == 'Mono' and '$(TargetsMobile)' != 'true' and '$(TargetsBrowser)' != 'true'">
<RuntimeSpecificFrameworkSuffix>Mono.LLVM</RuntimeSpecificFrameworkSuffix>
</PropertyGroup>
<PropertyGroup Condition="'$(MonoBundleLLVMOptimizer)' == 'true' and '$(RuntimeFlavor)' == 'Mono' and '$(TargetsMobile)' != 'true' and '$(TargetsBrowser)' != 'true'">
<RuntimeSpecificFrameworkSuffix>Mono.LLVM.AOT</RuntimeSpecificFrameworkSuffix>
</PropertyGroup>
<PropertyGroup Condition="'$(RuntimeSpecificFrameworkSuffix)' != ''">
<OverridePackageId>$(SharedFrameworkName).Runtime.$(RuntimeSpecificFrameworkSuffix).$(RuntimeIdentifier)</OverridePackageId>
</PropertyGroup>
<!--
hostpolicy and hostfxr aren't in the platform manifest in the ref pack and cannot be without breaking things upstack.
We add the entries here to ensure that we don't fail the validation that every file included in the runtime pack is in the platform manifest
without adding the entries to the manifest in the ref pack.
-->
<ItemGroup>
<PlatformManifestFileEntry Include="hostpolicy.dll" IsNative="true" />
<PlatformManifestFileEntry Include="libhostpolicy.so" IsNative="true" />
<PlatformManifestFileEntry Include="libhostpolicy.dylib" IsNative="true" />
<PlatformManifestFileEntry Include="hostfxr.dll" IsNative="true" />
<PlatformManifestFileEntry Include="libhostfxr.so" IsNative="true" />
<PlatformManifestFileEntry Include="libhostfxr.dylib" IsNative="true" />
</ItemGroup>
<Target Name="AddLinuxPackageInformation" BeforeTargets="GetDebInstallerJsonProperties;GetRpmInstallerJsonProperties">
<ItemGroup>
<LinuxPackageDependency Include="dotnet-hostfxr-$(MajorVersion).$(MinorVersion);dotnet-runtime-deps-$(MajorVersion).$(MinorVersion)" Version="$(InstallerPackageVersion)" />
</ItemGroup>
</Target>
<!-- Mobile uses a different hosting model, so we don't include the .NET host components. -->
<ItemGroup Condition="'$(TargetsMobile)' != 'true'">
<NativeRuntimeAsset Include="$(DotNetHostBinDir)/$(LibPrefix)hostpolicy$(LibSuffix)" />
<NativeRuntimeAsset Include="$(DotNetHostBinDir)/$(LibPrefix)hostfxr$(LibSuffix)" PackOnly="true" />
</ItemGroup>
<Target Name="AddRuntimeFilesToPackage" DependsOnTargets="ResolveRuntimeFilesFromLocalBuild">
<ItemGroup>
<RuntimeFiles Condition="'%(RuntimeFiles.IsNative)' == 'true'">
<TargetPath>runtimes/$(RuntimeIdentifier)/native</TargetPath>
</RuntimeFiles>
<RuntimeFiles Condition="'%(FileName)' == 'crossgen'">
<TargetPath>tools</TargetPath>
</RuntimeFiles>
<RuntimeFiles Condition="'$(TargetsMobile)' == 'true'"
Include="@(MonoIncludeFiles)"
ExcludeFromDataFiles="true">
<TargetPath>runtimes/$(RuntimeIdentifier)/native/include/%(RecursiveDir)</TargetPath>
</RuntimeFiles>
<RuntimeFiles Condition="'$(TargetsMacCatalyst)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'"
Include="@(FrameworkReleaseFiles)"
ExcludeFromDataFiles="true">
<TargetPath>runtimes/$(RuntimeIdentifier)/native/Mono.release.framework/%(RecursiveDir)</TargetPath>
</RuntimeFiles>
<RuntimeFiles Condition="'$(TargetsMacCatalyst)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'"
Include="@(FrameworkDebugFiles)"
ExcludeFromDataFiles="true">
<TargetPath>runtimes/$(RuntimeIdentifier)/native/Mono.debug.framework/%(RecursiveDir)</TargetPath>
</RuntimeFiles>
<RuntimeFiles Condition="'$(RuntimeFlavor)' == 'mono'"
Include="$(MonoArtifactsPath)\build\**\*.*"
ExcludeFromDataFiles="true">
<TargetPath>runtimes/$(RuntimeIdentifier)/build/%(RecursiveDir)</TargetPath>
</RuntimeFiles>
<CoreCLRCrossTargetFiles PackOnly="true" />
<CoreCLRCrossTargetFiles Condition="'%(FileName)' == 'clrjit' or '%(FileName)' == 'libclrjit'">
<TargetPath>runtimes/$(CoreCLRCrossTargetComponentDirName)_$(TargetArchitecture)/native</TargetPath>
</CoreCLRCrossTargetFiles>
<CoreCLRCrossTargetFiles Condition="'%(FileName)' == 'crossgen'">
<TargetPath>tools/$(CoreCLRCrossTargetComponentDirName)_$(TargetArchitecture)</TargetPath>
</CoreCLRCrossTargetFiles>
<CoreCLRCrossTargetFiles Condition="$([System.String]::new('%(FileName)').StartsWith('mscordaccore')) and '$(TargetsWindows)' == 'true'">
<TargetPath>tools/$(CoreCLRCrossTargetComponentDirName)_$(TargetArchitecture)</TargetPath>
</CoreCLRCrossTargetFiles>
<CoreCLRCrossTargetFiles Condition="'%(FileName)%(Extension)' == 'mscordbi.dll' and '$(TargetsWindows)' == 'true'">
<TargetPath>tools/$(CoreCLRCrossTargetComponentDirName)_$(TargetArchitecture)</TargetPath>
</CoreCLRCrossTargetFiles>
<CoreCLROptimizationFiles Include="$(CoreCLRArtifactsPath)StandardOptimizationData.mibc"
Condition="Exists('$(CoreCLRArtifactsPath)StandardOptimizationData.mibc')">
<TargetPath>tools</TargetPath>
</CoreCLROptimizationFiles>
<ReferenceCopyLocalPaths Include="@(RuntimeFiles);@(CoreCLRCrossTargetFiles);@(CoreCLROptimizationFiles)" />
</ItemGroup>
</Target>
<Target Name="AddFrameworkFilesToPackage" DependsOnTargets="ResolveLibrariesFromLocalBuild">
<ItemGroup>
<ReferenceCopyLocalPaths Include="@(LibrariesRuntimeFiles)"
Condition="'%(LibrariesRuntimeFiles.Extension)' != '.a' or '$(TargetsMobile)' == 'true'">
<TargetPath Condition="'%(LibrariesRuntimeFiles.NativeSubDirectory)' != ''">runtimes/$(RuntimeIdentifier)/native/%(LibrariesRuntimeFiles.NativeSubDirectory)%(RecursiveDir)</TargetPath>
</ReferenceCopyLocalPaths>
</ItemGroup>
</Target>
<PropertyGroup Condition="'$(TargetOS)' == 'windows'">
<!-- DiaSymReader for the host architecture, which is used for [cross-]compilation -->
<_diaSymArch>$(_hostArch)</_diaSymArch>
<_diaSymReaderPath>$(PkgMicrosoft_DiaSymReader_Native)/runtimes/win/native/Microsoft.DiaSymReader.Native.$(_diaSymArch).dll</_diaSymReaderPath>
<!-- DiaSymReader for the target architecture, which is placed into the package -->
<_diaSymTargetArch>$(TargetArchitecture)</_diaSymTargetArch>
<_diaSymTargetArch Condition="'$(TargetArchitecture)' == 'x64'">amd64</_diaSymTargetArch>
<_diaSymReaderTargetArchPath>$(PkgMicrosoft_DiaSymReader_Native)/runtimes/win/native/Microsoft.DiaSymReader.Native.$(_diaSymTargetArch).dll</_diaSymReaderTargetArchPath>
</PropertyGroup>
<ItemGroup Condition="'$(TargetOS)' == 'windows'">
<NativeRuntimeAsset Include="$(_diaSymReaderTargetArchPath)" />
<NativeRuntimeAsset Include="$(_diaSymReaderPath)" Condition="'$(CoreCLRCrossTargetComponentDirName)' != ''">
<TargetPath>runtimes/$(CoreCLRCrossTargetComponentDirName)_$(TargetArchitecture)/native</TargetPath>
</NativeRuntimeAsset>
</ItemGroup>
<!-- VS uses this file to show the target framework in the drop down. -->
<Target Name="CreateDotVersionFile"
DependsOnTargets="InitializeSourceControlInformationFromSourceControlManager"
BeforeTargets="GetFilesToPublish"
Condition="'$(DisableSourceLink)' != 'true'">
<ItemGroup>
<_VersionFile Include="$(IntermediateOutputPath).version" TargetPath="shared/$(SharedFrameworkName)/$(Version)/" />
</ItemGroup>
<WriteLinesToFile
Lines="$(SourceRevisionId);$(Version)"
File="@(_VersionFile)"
Overwrite="true"
WriteOnlyWhenDifferent="true" />
<ItemGroup>
<FilesToPublish Include="@(_VersionFile)" />
<FileWrites Include="@(_VersionFile)" />
</ItemGroup>
</Target>
<Import Project="$(Crossgen2SdkOverridePropsPath)" Condition="'$(Crossgen2SdkOverridePropsPath)' != ''" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.SharedFramework.Sdk" />
<Import Project="$(Crossgen2SdkOverrideTargetsPath)" Condition="'$(Crossgen2SdkOverrideTargetsPath)' != ''" />
<PropertyGroup>
<PublishReadyToRunComposite Condition="$(ForcePublishReadyToRunComposite) == 'true'">true</PublishReadyToRunComposite>
</PropertyGroup>
<!-- Put the mibc file into tools and not into PgoData, which will also hide it from being part of the RuntimeList.xml -->
<Target Name="RemoveMibcFromRuntimeListXml"
AfterTargets="GetFilesToPackage">
<ItemGroup>
<FilesToPackageMibcData Include="@(FilesToPackage)" Condition="'%(FilesToPackage.Identity)' == '$(CoreCLRArtifactsPath)StandardOptimizationData.mibc'">
<TargetPath>tools</TargetPath>
</FilesToPackageMibcData>
<FilesToPackage Remove="$(CoreCLRArtifactsPath)StandardOptimizationData.mibc"/>
<FilesToPackage Include="@(FilesToPackageMibcData)"/>
</ItemGroup>
</Target>
</Project>