|
18 | 18 | <CopyCoreDisToolsToCoreRoot Condition="$(GCStressDependsOnCoreDisTools) And '$(DotNetBuildSourceOnly)' != 'true'">true</CopyCoreDisToolsToCoreRoot> |
19 | 19 | <!-- Non-desktop OS's use a custom dotnet host, instead of corerun --> |
20 | 20 | <IsDesktopOS Condition="'$(TargetsBrowser)' != 'true' and '$(TargetsAndroid)' != 'true' and '$(TargetstvOS)' != 'true' and '$(TargetsiOS)' != 'true' and '$(TargetsMacCatalyst)' != 'true'">true</IsDesktopOS> |
21 | | - <Crossgen2Supported Condition="'$(RuntimeFlavor)' == 'coreclr' and '$(TestBuildMode)' != 'nativeaot'">true</Crossgen2Supported> |
22 | 21 | </PropertyGroup> |
23 | 22 |
|
24 | 23 | <Import Project="$(RepositoryEngineeringDir)coredistools.targets" Condition="$(CopyCoreDisToolsToCoreRoot)" /> |
|
35 | 34 | </ItemDefinitionGroup> |
36 | 35 |
|
37 | 36 | <Target Name="CopyDependencyToCoreRoot" |
38 | | - DependsOnTargets="ResolveAssemblyReferences;ResolveRuntimeFilesFromLocalBuild"> |
39 | | - |
40 | | - <!-- Copy apphost to crossgen2_publish directory. |
41 | | - The default configuration between product and tests are flipped. When we build project like: |
42 | | - `build -c debug -rc checked`, the corresponding test command is `src/tests/build -checked -p:LibrariesConfiguration=debug`, |
43 | | - instead of `-debug -p:RuntimeConfiguration=checked`. That forces us to either pass the |
44 | | - `HostConfiguration=debug` explicitly or fix this disparity; both of which will break the dev workflow. |
45 | | - |
46 | | - As a workaround, we will first check if the directory pointed by `HostConfiguration` exists, then check |
47 | | - `LibrariesConfiguration`. |
48 | | - --> |
49 | | - |
50 | | - <PropertyGroup Condition="'$(Crossgen2Supported)' == 'true'"> |
51 | | - <_targetOS>$(TargetOS)</_targetOS> |
52 | | - <_targetOS Condition="'$(_targetOS)' == 'windows'">win</_targetOS> |
53 | | - <_apphostPath Condition="Exists('$(ArtifactsBinDir)$(_targetOS)-$(TargetArchitecture).$(HostConfiguration)\corehost\apphost$(ExeSuffix)')">$(ArtifactsBinDir)$(_targetOS)-$(TargetArchitecture).$(HostConfiguration)\corehost\apphost$(ExeSuffix)</_apphostPath> |
54 | | - <_apphostPath Condition="'$(_apphostPath)' == '' and Exists('$(ArtifactsBinDir)$(_targetOS)-$(TargetArchitecture).$(LibrariesConfiguration)\corehost\apphost$(ExeSuffix)')">$(ArtifactsBinDir)$(_targetOS)-$(TargetArchitecture).$(LibrariesConfiguration)\corehost\apphost$(ExeSuffix)</_apphostPath> |
55 | | - <_toolsConfiguration Condition="Exists('$(ArtifactsBinDir)ILLink.Tasks\$(ToolsConfiguration)\$(NetCoreAppToolCurrent)\ILLink.Tasks.dll')">$(ToolsConfiguration)</_toolsConfiguration> |
56 | | - <_toolsConfiguration Condition="Exists('$(ArtifactsBinDir)ILLink.Tasks\$(LibrariesConfiguration)\$(NetCoreAppToolCurrent)\ILLink.Tasks.dll')">$(LibrariesConfiguration)</_toolsConfiguration> |
57 | | - </PropertyGroup> |
58 | | - |
59 | | - <MakeDir Condition="'$(Crossgen2Supported)' == 'true'" Directories="$(ArtifactsObjDir)coreclr\crossgen2_publish\$(TargetOS).$(TargetArchitecture).$(RuntimeConfiguration)" /> |
60 | | - |
61 | | - <Copy |
62 | | - SourceFiles="$(_apphostPath)" |
63 | | - DestinationFiles="$(ArtifactsObjDir)coreclr\crossgen2_publish\$(TargetOS).$(TargetArchitecture).$(RuntimeConfiguration)\apphost$(ExeSuffix)" |
64 | | - Condition="'$(Crossgen2Supported)' == 'true'" /> |
65 | | - |
66 | | - <!-- Publish crossgen2 on supported platforms. --> |
67 | | - |
68 | | - <MSBuild Condition="'$(Crossgen2Supported)' == 'true'" |
69 | | - Targets="Restore" |
70 | | - BuildInParallel="true" |
71 | | - Properties="NativeAotSupported=$(NativeAotSupported);UseNativeAotForComponents=$(UseNativeAotForComponents);ToolsConfiguration=$(_toolsConfiguration);MSBuildRestoreSessionId=$([System.Guid]::NewGuid());" |
72 | | - Projects="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Crossgen2.sfxproj" /> |
73 | | - |
74 | | - <MSBuild Condition="'$(Crossgen2Supported)' == 'true'" |
75 | | - Targets="PublishToDisk" |
76 | | - BuildInParallel="true" |
77 | | - Properties="NativeAotSupported=$(NativeAotSupported);UseNativeAotForComponents=$(UseNativeAotForComponents);ToolsConfiguration=$(_toolsConfiguration);OutputPath=$(CORE_ROOT)\crossgen2;" |
78 | | - Projects="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Crossgen2.sfxproj" /> |
| 37 | + DependsOnTargets="ResolveAssemblyReferences;ResolveRuntimeFilesFromLocalBuild"> |
79 | 38 |
|
80 | 39 | <ItemGroup> |
81 | 40 | <RunTimeDependencyCopyLocal Include="@(RuntimeCopyLocalItems)" /> |
|
121 | 80 | <!-- Used by the Crossgen comparison job --> |
122 | 81 | <RunTimeArtifactsIncludeFolders Include="IL/" TargetDir="IL/" /> |
123 | 82 |
|
| 83 | + <!-- Used for Crossgen2 R2R tests --> |
| 84 | + <RunTimeArtifactsIncludeFolders Include="crossgen2/" TargetDir="crossgen2/"> |
| 85 | + <IncludeSubFolders>True</IncludeSubFolders> |
| 86 | + </RunTimeArtifactsIncludeFolders> |
| 87 | + |
124 | 88 | <!-- Used for NativeAOT tests --> |
125 | 89 | <RunTimeArtifactsIncludeFolders Include="ilc-published/" TargetDir="ilc-published/"> |
126 | 90 | <IncludeSubFolders>True</IncludeSubFolders> |
|
171 | 135 |
|
172 | 136 | <RunTimeDependencyCopyLocal |
173 | 137 | Condition="'%(RuntimeArtifactsIncludeFolders.IncludeSubFolders)' == 'True'" |
174 | | - Include="$(CoreCLRArtifactsPath)%(RunTimeArtifactsIncludeFolders.Identity)**\*" |
| 138 | + Include="$(CoreCLRArtifactsPath)%(RunTimeArtifactsIncludeFolders.Identity)**/*" |
175 | 139 | Exclude="@(RunTimeArtifactsExcludeFiles -> '$(CoreCLRArtifactsPath)%(Identity)')" |
176 | 140 | TargetDir="%(RunTimeArtifactsIncludeFolders.TargetDir)" /> |
177 | 141 | </ItemGroup> |
|
259 | 223 |
|
260 | 224 | <Copy |
261 | 225 | SourceFiles="@(RunTimeDependencyCopyLocal)" |
262 | | - DestinationFiles="@(RunTimeDependencyCopyLocal -> '$(CORE_ROOT)\%(TargetDir)%(RecursiveDir)%(Filename)%(Extension)')" |
| 226 | + DestinationFiles="@(RunTimeDependencyCopyLocal -> '$(CORE_ROOT)/%(TargetDir)%(RecursiveDir)%(Filename)%(Extension)')" |
263 | 227 | SkipUnchangedFiles="$(SkipCopyUnchangedFiles)" |
264 | 228 | OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" |
265 | 229 | Retries="$(CopyRetryCount)" |
|
0 commit comments