forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Subsets.props
281 lines (227 loc) · 16.3 KB
/
Subsets.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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
<Project>
<!--
This file defines the list of projects to build and divides them into subsets. In ordinary
situations, you should perform a full build by running 'build.cmd' or './build.sh'. This ensures
the projects are sequenced correctly so the outputs and test results are what you would expect.
Examples:
./build.sh CoreHost
This builds only the .NET Core Host.
./build.sh corehost installer.managed
This builds the CoreHost and also the Managed installer portion (e.g. Microsoft.DotNet.PlatformAbstractions)
projects. A space ' ' or '+' are the delimiters between multiple subsets to build.
./build.sh -test installer.tests
This builds and executes the installer test projects. (The '-test' argument is an Arcade SDK argument
that indicates tests should be run. Otherwise, they'll only be built.)
Quirks:
This command looks useful, but doesn't work as expected:
./build.sh -test /p:Subset=CoreHost-Test # (Doesn't work!)
Intuitively, this should build the host, build the tests, then run the tests on the freshly
built host. What actually happens is the tests run on a previously built host. This is because
the depproj, pkgproj, and installer subsets process the host artifacts, and those didn't
rebuild because those subsets were disabled.
You can get around this limitation by running the corehost subset, manually copying host
artifacts to the test layout, then running the test subset.
-->
<PropertyGroup>
<DefaultSubsets>clr+mono+libs+installer</DefaultSubsets>
<DefaultSubsets Condition="'$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'tvOS'">mono+libs+installer</DefaultSubsets>
<DefaultSubsets Condition="'$(TargetOS)' == 'WebAssembly'">mono+libs</DefaultSubsets>
</PropertyGroup>
<!-- Init _subset here in to allow RuntimeFlavor to be set as early as possible -->
<PropertyGroup>
<_subset Condition="'$(Subset)' != ''">+$(Subset.ToLowerInvariant())+</_subset>
<_subset Condition="'$(Subset)' == ''">+$(DefaultSubsets)+</_subset>
</PropertyGroup>
<PropertyGroup>
<RuntimeFlavor Condition="'$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'WebAssembly'">Mono</RuntimeFlavor>
<RuntimeFlavor Condition="'$(RuntimeFlavor)' == '' and ($(_subset.Contains('+mono+')) or $(_subset.Contains('+mono.runtime+'))) and (!$(_subset.Contains('+clr+')) and !$(_subset.Contains('+clr.runtime+')))">Mono</RuntimeFlavor>
<RuntimeFlavor Condition="'$(RuntimeFlavor)' == ''">CoreCLR</RuntimeFlavor>
</PropertyGroup>
<PropertyGroup>
<DefaultCoreClrSubsets>clr.runtime+linuxdac+clr.corelib+clr.nativecorelib+clr.tools+clr.buildtools+clr.packages</DefaultCoreClrSubsets>
<DefaultMonoSubsets Condition="'$(MonoEnableLLVM)' == 'true' and '$(MonoLLVMDir)' == ''">mono.llvm+</DefaultMonoSubsets>
<DefaultMonoSubsets>$(DefaultMonoSubsets)mono.runtime+mono.corelib</DefaultMonoSubsets>
<DefaultLibrariesSubsets>libs.depprojs+libs.native+libs.ref+libs.src+libs.pretest+libs.packages</DefaultLibrariesSubsets>
<DefaultInstallerSubsets>corehost+installer.managed+installer.depprojs+installer.pkgprojs+bundles+installers+installer.tests</DefaultInstallerSubsets>
<DefaultInstallerSubsets Condition="'$(RuntimeFlavor)' == 'Mono'">installer.pkgprojs</DefaultInstallerSubsets>
</PropertyGroup>
<PropertyGroup>
<_subset>$(_subset.Replace('+clr+', '+$(DefaultCoreClrSubsets)+'))</_subset>
<_subset>$(_subset.Replace('+mono+', '+$(DefaultMonoSubsets)+'))</_subset>
<_subset>$(_subset.Replace('+libs+', '+$(DefaultLibrariesSubsets)+'))</_subset>
<_subset>$(_subset.Replace('+installer+', '+$(DefaultInstallerSubsets)+'))</_subset>
<!-- Surround _subset in dashes to simplify checks below -->
<_subset>+$(_subset.Trim('+'))+</_subset>
</PropertyGroup>
<ItemGroup>
<!-- CoreClr -->
<SubsetName Include="Clr" Description="The CoreCLR runtime, LinuxDac, CoreLib (+ native), tools and packages." />
<SubsetName Include="Clr.Runtime" Description="The CoreCLR .NET runtime." />
<SubsetName Include="LinuxDac" Condition="$([MSBuild]::IsOsPlatform(Windows))" Description="The cross-OS Windows->libc-based Linux DAC. Skipped on x86." />
<SubsetName Include="AlpineDac" Condition="$([MSBuild]::IsOsPlatform(Windows))" OnDemand="true" Description="The cross-OS Windows->musl-libc-based Linux DAC. Skipped on x86." />
<SubsetName Include="Clr.CoreLib" Description="The managed System.Private.CoreLib library for CoreCLR." />
<SubsetName Include="Clr.NativeCoreLib" Description="Run crossgen on System.Private.CoreLib library for CoreCLR." />
<SubsetName Include="Clr.Tools" Description="Managed tools that support CoreCLR development and testing." />
<SubsetName Include="Clr.BuildTools" Description="Tools needed for the native CoreCLR build." />
<SubsetName Include="Clr.Packages" Description="The projects that produce NuGet packages for the CoreCLR runtime, crossgen, and IL tools." />
<!-- Mono -->
<SubsetName Include="Mono" Description="The Mono runtime and CoreLib." />
<SubsetName Include="Mono.Runtime" Description="The Mono .NET runtime." />
<SubsetName Include="Mono.CoreLib" Description="The managed System.Private.CoreLib library for Mono." />
<!-- Libs -->
<SubsetName Include="Libs" Description="The libraries native part, refs and source assemblies, test infra and packages, but NOT the tests (use Libs.Tests to request those explicitly)" />
<SubsetName Include="Libs.Depprojs" Description="The libraries upfront restore projects." />
<SubsetName Include="Libs.Native" Description="The native libraries used in the shared framework." />
<SubsetName Include="Libs.Ref" Description="The managed reference libraries." />
<SubsetName Include="Libs.Src" Description="The managed implementation libraries." />
<SubsetName Include="Libs.PreTest" Description="Test assets which are necessary to run tests." />
<SubsetName Include="Libs.Packages" Description="The projects that produce NuGet packages from libraries." />
<SubsetName Include="Libs.Tests" OnDemand="true" Description="The test projects. Note that building this doesn't execute tests: you must also pass the '-test' argument." />
<!-- Installer -->
<SubsetName Include="Installer" Description="The .NET Core hosts, hosting libraries, bundles, and installers. Includes these projects' tests." />
<SubsetName Include="CoreHost" Description="The .NET Core hosts." />
<SubsetName Include="Installer.Managed" Description="The managed .NET hosting projects. This includes PlatformAbstractions and HostModel." />
<SubsetName Include="Installer.DepProjs" Description="The dependency projects. These gather shared framework files and run crossgen on them to turn them into ready-to-run (R2R) assemblies for the current platform." />
<SubsetName Include="Installer.PkgProjs" Description="The packaging projects. These produce NETCoreApp assets: NuGet packages, installers, zips, and Linux packages." />
<SubsetName Include="Bundles" Description="The shared framework bundle installer projects. Produces .exe installers for Windows." />
<SubsetName Include="Installers" Description="Generates additional installers. This produces the shared frameworks and their installers." />
<SubsetName Include="Installer.Tests" Description="The test projects. Note that building this doesn't execute tests: you must also pass the '-test' argument." />
<SubsetName Include="Installer.Publish" OnDemand="true" Description="Builds the installer publish infrastructure." />
</ItemGroup>
<!-- Default targets, parallelization and configurations. -->
<ItemDefinitionGroup>
<CoreClrProject>
<Test>false</Test>
<Pack>false</Pack>
<Publish>false</Publish>
<BuildInParallel>false</BuildInParallel>
<AdditionalProperties Condition="'$(CoreCLRConfiguration)' != ''">Configuration=$(CoreCLRConfiguration)</AdditionalProperties>
</CoreClrProject>
<MonoProject>
<Test>false</Test>
<Pack>false</Pack>
<Publish>false</Publish>
<BuildInParallel>false</BuildInParallel>
<AdditionalProperties Condition="'$(MonoConfiguration)' != ''">Configuration=$(MonoConfiguration)</AdditionalProperties>
</MonoProject>
<LibrariesProject>
<Test>false</Test>
<Pack>false</Pack>
<Publish>false</Publish>
<BuildInParallel>false</BuildInParallel>
<AdditionalProperties Condition="'$(LibrariesConfiguration)' != ''">Configuration=$(LibrariesConfiguration)</AdditionalProperties>
</LibrariesProject>
<InstallerProject>
<Test>false</Test>
<Pack>true</Pack>
<Publish>false</Publish>
</InstallerProject>
</ItemDefinitionGroup>
<!-- CoreClr sets -->
<ItemGroup Condition="$(_subset.Contains('+clr.buildtools+'))">
<CoreClrProject Include="$(CoreClrProjectRoot)src\tools\GetModuleIndex\GetModuleIndex.csproj" />
</ItemGroup>
<ItemGroup Condition="$(_subset.Contains('+clr.corelib+'))">
<CoreClrProject Include="$(CoreClrProjectRoot)src\System.Private.CoreLib\System.Private.CoreLib.csproj" />
</ItemGroup>
<ItemGroup Condition="$(_subset.Contains('+clr.runtime+'))">
<CoreClrProject Include="$(CoreClrProjectRoot)runtime.proj" />
</ItemGroup>
<ItemGroup Condition="$(_subset.Contains('+linuxdac+')) and $([MSBuild]::IsOsPlatform(Windows)) and '$(TargetArchitecture)' != 'x86'">
<CoreClrProject Include="$(CoreClrProjectRoot)runtime.proj" AdditionalProperties="%(AdditionalProperties);CrossDac=linux" />
</ItemGroup>
<ItemGroup Condition="$(_subset.Contains('+alpinedac+')) and $([MSBuild]::IsOsPlatform(Windows)) and '$(TargetArchitecture)' != 'x86'">
<CoreClrProject Include="$(CoreClrProjectRoot)runtime.proj" AdditionalProperties="%(AdditionalProperties);CrossDac=alpine" />
</ItemGroup>
<ItemGroup Condition="$(_subset.Contains('+clr.nativecorelib+'))">
<CoreClrProject Include="$(CoreClrProjectRoot)crossgen-corelib.proj" />
</ItemGroup>
<ItemGroup Condition="$(_subset.Contains('+clr.tools+'))">
<CoreClrProject Include="$(CoreClrProjectRoot)src\tools\runincontext\runincontext.csproj" BuildInParallel="true" />
<CoreClrProject Include="$(CoreClrProjectRoot)src\tools\r2rdump\R2RDump.csproj" BuildInParallel="true" />
<CoreClrProject Include="$(CoreClrProjectRoot)src\tools\dotnet-pgo\dotnet-pgo.csproj" BuildInParallel="true" />
<CoreClrProject Include="$(CoreClrProjectRoot)src\tools\r2rtest\R2RTest.csproj" BuildInParallel="true" />
<CoreClrProject Include="$(CoreClrProjectRoot)src\tools\crossgen2\crossgen2\crossgen2.csproj" />
</ItemGroup>
<ItemGroup Condition="$(_subset.Contains('+clr.packages+'))">
<CoreClrProject Include="$(CoreClrProjectRoot)src\.nuget\coreclr-packages.proj" Pack="true" />
</ItemGroup>
<!-- Mono sets -->
<ItemGroup Condition="$(_subset.Contains('+mono.llvm+'))">
<MonoProject Include="$(MonoProjectRoot)llvm\llvm-init.proj" />
</ItemGroup>
<ItemGroup Condition="$(_subset.Contains('+mono.runtime+'))">
<MonoProject Include="$(MonoProjectRoot)mono.proj" />
</ItemGroup>
<ItemGroup Condition="$(_subset.Contains('+mono.corelib+'))">
<MonoProject Include="$(MonoProjectRoot)netcore\System.Private.CoreLib\System.Private.CoreLib.csproj" />
</ItemGroup>
<!-- Libraries sets -->
<ItemGroup Condition="$(_subset.Contains('+libs.depprojs+'))">
<LibrariesRestoreProject Include="$(LibrariesProjectRoot)restore\depproj.proj">
<AdditionalProperties Condition="'$(LibrariesConfiguration)' != ''">Configuration=$(LibrariesConfiguration)</AdditionalProperties>
</LibrariesRestoreProject>
</ItemGroup>
<ItemGroup Condition="$(_subset.Contains('+libs.native+'))">
<LibrariesProject Include="$(LibrariesProjectRoot)Native\build-native.proj" />
</ItemGroup>
<ItemGroup Condition="$(_subset.Contains('+libs.ref+'))">
<LibrariesProject Include="$(LibrariesProjectRoot)ref.proj" />
</ItemGroup>
<ItemGroup Condition="$(_subset.Contains('+libs.src+'))">
<LibrariesProject Include="$(LibrariesProjectRoot)src.proj" />
</ItemGroup>
<ItemGroup Condition="$(_subset.Contains('+libs.pretest+'))">
<LibrariesProject Include="$(LibrariesProjectRoot)pretest.proj" />
</ItemGroup>
<ItemGroup Condition="$(_subset.Contains('+libs.packages+'))">
<LibrariesProject Include="$(LibrariesProjectRoot)libraries-packages.proj" Pack="true" />
</ItemGroup>
<ItemGroup Condition="$(_subset.Contains('+libs.tests+'))">
<LibrariesProject Include="$(LibrariesProjectRoot)tests.proj" Test="true" />
</ItemGroup>
<!-- Installer sets -->
<ItemGroup Condition="$(_subset.Contains('+corehost+'))">
<CorehostProjectToBuild Include="$(InstallerProjectRoot)corehost\build.proj" SignPhase="Binaries" />
<InstallerProject Include="@(CorehostProjectToBuild)" />
</ItemGroup>
<ItemGroup Condition="$(_subset.Contains('+installer.managed+'))">
<ManagedProjectToBuild Include="$(InstallerProjectRoot)managed\**\*.csproj" SignPhase="Binaries" />
<ManagedProjectToBuild Include="$(InstallerProjectRoot)pkg\packaging\pack-managed.proj" />
<InstallerProject Include="@(ManagedProjectToBuild)" />
</ItemGroup>
<ItemGroup Condition="$(_subset.Contains('+installer.depprojs+'))">
<DepprojProjectToBuild Condition="'$(RuntimeFlavor)' == 'CoreCLR'" Include="$(InstallerProjectRoot)pkg\projects\**\*.depproj" SignPhase="R2RBinaries" BuildInParallel="false" />
<DepprojProjectToBuild Condition="'$(RuntimeFlavor)' == 'Mono'" Include="$(InstallerProjectRoot)pkg\projects\**\*.depproj" SignPhase="Binaries" BuildInParallel="false" />
<!-- Disable netstandard infra for now and discuss if we should delete it: https://github.com/dotnet/runtime/issues/2294-->
<DepprojProjectToBuild Remove="$(InstallerProjectRoot)pkg\projects\netstandard\src\netstandard.depproj" />
<InstallerProject Include="@(DepprojProjectToBuild)" />
</ItemGroup>
<ItemGroup Condition="$(_subset.Contains('+installer.pkgprojs+'))">
<PkgprojProjectToBuild Include="$(InstallerProjectRoot)pkg\projects\**\*.pkgproj" SignPhase="MsiFiles" BuildInParallel="false" />
<!-- Disable netstandard infra for now and discuss if we should delete it: https://github.com/dotnet/runtime/issues/2294-->
<PkgprojProjectToBuild Remove="$(InstallerProjectRoot)pkg\projects\netstandard\pkg\NETStandard.Library.Ref.pkgproj" />
<InstallerProject Include="@(PkgprojProjectToBuild)" />
</ItemGroup>
<ItemGroup Condition="$(_subset.Contains('+bundles+'))">
<BundleProjectToBuild Include="$(InstallerProjectRoot)pkg\projects\**\*.bundleproj" SignPhase="BundleInstallerFiles" BuildInParallel="false" />
<InstallerProject Include="@(BundleProjectToBuild)" />
</ItemGroup>
<ItemGroup Condition="$(_subset.Contains('+installers+'))">
<InstallerProjectToBuild Include="$(InstallerProjectRoot)pkg\packaging\installers.proj" BuildInParallel="false" />
<InstallerProjectToBuild Include="$(InstallerProjectRoot)pkg\packaging\vs-insertion-packages.proj" BuildInParallel="false" />
<InstallerProject Include="@(InstallerProjectToBuild)" />
</ItemGroup>
<ItemGroup Condition="$(_subset.Contains('+installer.tests+'))">
<TestProjectToBuild Include="$(InstallerProjectRoot)test\Microsoft.NET.HostModel.Tests\AppHost.Bundle.Tests\AppHost.Bundle.Tests.csproj" />
<TestProjectToBuild Include="$(InstallerProjectRoot)test\Microsoft.NET.HostModel.Tests\Microsoft.NET.HostModel.AppHost.Tests\Microsoft.NET.HostModel.AppHost.Tests.csproj" />
<TestProjectToBuild Include="$(InstallerProjectRoot)test\Microsoft.NET.HostModel.Tests\Microsoft.NET.HostModel.Bundle.Tests\Microsoft.NET.HostModel.Bundle.Tests.csproj" />
<TestProjectToBuild Include="$(InstallerProjectRoot)test\Microsoft.NET.HostModel.Tests\Microsoft.NET.HostModel.ComHost.Tests\Microsoft.NET.HostModel.ComHost.Tests.csproj" />
<TestProjectToBuild Include="$(InstallerProjectRoot)test\HostActivation.Tests\HostActivation.Tests.csproj" />
<TestProjectToBuild Include="$(InstallerProjectRoot)test\Microsoft.DotNet.CoreSetup.Packaging.Tests\Microsoft.DotNet.CoreSetup.Packaging.Tests.csproj" />
<InstallerProject Include="@(TestProjectToBuild)" Pack="false" Test="true" BuildInParallel="false" />
</ItemGroup>
<ItemGroup Condition="$(_subset.Contains('+installer.publish+'))">
<InstallerProject Include="$(InstallerProjectRoot)publish\prepare-artifacts.proj" />
</ItemGroup>
</Project>