|
18 | 18 | <CLRTestPriority Condition="'$(CLRTestPriority)' == ''">0</CLRTestPriority> |
19 | 19 | <!-- Merged test runner assemblies might not have any non-generated sources, and that's okay --> |
20 | 20 | <NoWarn Condition="'$(IsMergedTestRunnerAssembly)' == 'true'">$(NoWarn);CS2008</NoWarn> |
| 21 | + <Crossgen2Supported Condition="'$(RuntimeFlavor)' == 'coreclr' and '$(TestBuildMode)' != 'nativeaot'">true</Crossgen2Supported> |
| 22 | + <UsePublishedCrossgen2 Condition="'$(Crossgen2Supported)' == 'true' and '$(Configuration)' != 'checked'">true</UsePublishedCrossgen2> |
21 | 23 | </PropertyGroup> |
22 | 24 |
|
23 | 25 | <!-- All CLRTests need to be of a certain "kind". These kinds are enumerated below. |
|
446 | 448 | <Target Name="CopyDependencyToCoreRoot" |
447 | 449 | DependsOnTargets="ResolveAssemblyReferences;ResolveRuntimeFilesFromLocalBuild"> |
448 | 450 |
|
| 451 | + <!-- |
| 452 | + Publish crossgen2 on supported platforms. |
| 453 | + Publish to a temp directory to avoid msbuild glob computation problems. |
| 454 | + --> |
| 455 | + <MakeDir Directories="$(CORE_ROOT)" /> |
| 456 | + |
| 457 | + <MSBuild Condition="'$(Crossgen2Supported)' == 'true' and '$(UsePublishedCrossgen2)' != 'true'" |
| 458 | + Targets="Restore;PublishCrossgen" |
| 459 | + BuildInParallel="true" |
| 460 | + Properties="PublishDir=$(CORE_ROOT)\..\crossgen2;PublishSelfContained=true;NativeAotSupported=false;PublishSingleFile=false;PublishReadyToRun=false;SkipRunPublishedCrossgen=true" |
| 461 | + Projects="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Crossgen2.sfxproj" /> |
| 462 | + |
| 463 | + <MSBuild Condition="'$(UsePublishedCrossgen2)' == 'true'" |
| 464 | + Targets="Restore;Publish" |
| 465 | + BuildInParallel="true" |
| 466 | + Properties="PublishDir=$(CORE_ROOT)\..\crossgen2" |
| 467 | + Projects="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Crossgen2.sfxproj" /> |
| 468 | + |
449 | 469 | <ItemGroup> |
450 | 470 | <RunTimeDependencyExclude Include="$(CORE_ROOT)\**\*.*" /> |
451 | 471 | <RunTimeDependencyExcludeFiles Include="@(RunTimeDependencyExclude -> '%(FileName)%(Extension)')" /> |
|
487 | 507 | <!-- Used by the Crossgen comparison job --> |
488 | 508 | <RunTimeArtifactsIncludeFolders Include="IL/" /> |
489 | 509 |
|
490 | | - <!-- Used for Crossgen2 R2R tests --> |
491 | | - <RunTimeArtifactsIncludeFolders Include="crossgen2/"> |
492 | | - <IncludeSubFolders>True</IncludeSubFolders> |
493 | | - </RunTimeArtifactsIncludeFolders> |
494 | | - |
495 | 510 | <!-- Used for capturing symbolic stack traces using Watson --> |
496 | 511 | <RunTimeArtifactsIncludeFolders Include="PDB/" /> |
497 | 512 |
|
|
510 | 525 | </ItemGroup> |
511 | 526 |
|
512 | 527 | <ItemGroup> |
513 | | - <Crossgen2DependencyCopyLocal |
514 | | - Condition="'$(RuntimeFlavor)' == 'coreclr' and '$(TestBuildMode)' != 'nativeaot'" |
515 | | - Include="$(CoreCLRArtifactsPath)crossgen2\$(OutputRid)\publish\**\*" |
516 | | - TargetDir="%(RunTimeArtifactsIncludeFolders.Identity)" /> |
517 | | - |
518 | 528 | <!-- Add binary dependencies to copy-local items --> |
519 | 529 | <RunTimeDependencyCopyLocal |
520 | 530 | Condition="'%(RuntimeArtifactsIncludeFolders.IncludeSubFolders)' != 'True'" |
|
527 | 537 | Include="$(CoreCLRArtifactsPath)%(RunTimeArtifactsIncludeFolders.Identity)**\*" |
528 | 538 | Exclude="@(RunTimeArtifactsExcludeFiles -> '$(CoreCLRArtifactsPath)%(Identity)')" |
529 | 539 | TargetDir="%(RunTimeArtifactsIncludeFolders.Identity)" /> |
530 | | - |
531 | | - |
532 | 540 | </ItemGroup> |
533 | 541 |
|
534 | 542 | <ItemGroup Condition="'$(TargetArchitecture)' == 'wasm'"> |
|
586 | 594 | <Output TaskParameter="DestinationFiles" ItemName="FileWrites" /> |
587 | 595 | </Copy> |
588 | 596 |
|
589 | | - <MSBuild Condition="'$(RuntimeFlavor)' == 'coreclr' and '$(TestBuildMode)' != 'nativeaot'" |
590 | | - Targets="Restore;Publish" |
591 | | - Projects="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Crossgen2.sfxproj" /> |
592 | | - |
593 | | - <Copy |
594 | | - Condition="'$(RuntimeFlavor)' == 'coreclr' and '$(TestBuildMode)' != 'nativeaot'" |
595 | | - SourceFiles="@(Crossgen2DependencyCopyLocal)" |
596 | | - DestinationFiles="@(Crossgen2DependencyCopyLocal -> '$(CORE_ROOT)\crossgen2\%(RecursiveDir)%(Filename)%(Extension)')" |
597 | | - SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" |
598 | | - OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" |
599 | | - Retries="$(CopyRetryCount)" |
600 | | - RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" |
601 | | - UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)"> |
602 | | - <Output TaskParameter="DestinationFiles" ItemName="FileWrites" /> |
603 | | - </Copy> |
604 | | - |
605 | 597 | </Target> |
606 | 598 |
|
607 | 599 | <Target Name="GetProjectsWithDisabledBuild" Returns="@(ProjectWithDisabledBuild)"> |
|
0 commit comments