|
19 | 19 | <CopyCoreDisToolsToCoreRoot Condition="$(GCStressDependsOnCoreDisTools) And '$(DotNetBuildSourceOnly)' != 'true'">true</CopyCoreDisToolsToCoreRoot>
|
20 | 20 | <!-- Non-desktop OS's use a custom dotnet host, instead of corerun -->
|
21 | 21 | <IsDesktopOS Condition="'$(TargetsBrowser)' != 'true' and '$(TargetsAndroid)' != 'true' and '$(TargetstvOS)' != 'true' and '$(TargetsiOS)' != 'true' and '$(TargetsMacCatalyst)' != 'true'">true</IsDesktopOS>
|
22 |
| - <UsePublishedCrossgen2 Condition="'$(RuntimeFlavor)' == 'coreclr' and '$(TestBuildMode)' != 'nativeaot'">true</UsePublishedCrossgen2> |
23 | 22 | </PropertyGroup>
|
24 | 23 |
|
25 | 24 | <Import Project="$(RepositoryEngineeringDir)coredistools.targets" Condition="$(CopyCoreDisToolsToCoreRoot)" />
|
|
38 | 37 | <Target Name="CopyDependencyToCoreRoot"
|
39 | 38 | DependsOnTargets="ResolveAssemblyReferences;ResolveRuntimeFilesFromLocalBuild">
|
40 | 39 |
|
41 |
| - <!-- Copy apphost to crossgen2_publish directory. |
42 |
| - The default configuration between product and tests are flipped. When we build project like: |
43 |
| - `build -c debug -rc checked`, the corresponding test command is `src/tests/build -checked -p:LibrariesConfiguration=debug`, |
44 |
| - instead of `-debug -p:RuntimeConfiguration=checked`. That forces us to either pass the |
45 |
| - `HostConfiguration=debug` explicitly or fix this disparity; both of which will break the dev workflow. |
46 |
| -
|
47 |
| - As a workaround, we will first check if the directory pointed by `HostConfiguration` exists, then check |
48 |
| - `LibrariesConfiguration`. |
49 |
| - --> |
50 |
| - |
51 |
| - <PropertyGroup Condition="'$(UsePublishedCrossgen2)' == 'true'"> |
52 |
| - <_targetOS>$(TargetOS)</_targetOS> |
53 |
| - <_targetOS Condition="'$(_targetOS)' == 'windows'">win</_targetOS> |
54 |
| - <_apphostPath Condition="Exists('$(ArtifactsBinDir)$(_targetOS)-$(TargetArchitecture).$(HostConfiguration)\corehost\apphost$(ExeSuffix)')">$(ArtifactsBinDir)$(_targetOS)-$(TargetArchitecture).$(HostConfiguration)\corehost\apphost$(ExeSuffix)</_apphostPath> |
55 |
| - <_apphostPath Condition="'$(_apphostPath)' == '' and Exists('$(ArtifactsBinDir)$(_targetOS)-$(TargetArchitecture).$(LibrariesConfiguration)\corehost\apphost$(ExeSuffix)')">$(ArtifactsBinDir)$(_targetOS)-$(TargetArchitecture).$(LibrariesConfiguration)\corehost\apphost$(ExeSuffix)</_apphostPath> |
56 |
| - <_toolsConfiguration Condition="Exists('$(ArtifactsBinDir)ILLink.Tasks\$(ToolsConfiguration)\$(NetCoreAppToolCurrent)\ILLink.Tasks.dll')">$(ToolsConfiguration)</_toolsConfiguration> |
57 |
| - <_toolsConfiguration Condition="Exists('$(ArtifactsBinDir)ILLink.Tasks\$(LibrariesConfiguration)\$(NetCoreAppToolCurrent)\ILLink.Tasks.dll')">$(LibrariesConfiguration)</_toolsConfiguration> |
58 |
| - </PropertyGroup> |
59 |
| - |
60 |
| - <MakeDir Condition="'$(UsePublishedCrossgen2)' == 'true'" Directories="$(ArtifactsObjDir)coreclr\crossgen2_publish\$(TargetOS).$(TargetArchitecture).$(RuntimeConfiguration)" /> |
61 |
| - |
62 |
| - <Copy |
63 |
| - SourceFiles="$(_apphostPath)" |
64 |
| - DestinationFiles="$(ArtifactsObjDir)coreclr\crossgen2_publish\$(TargetOS).$(TargetArchitecture).$(RuntimeConfiguration)\apphost$(ExeSuffix)" |
65 |
| - Condition="'$(UsePublishedCrossgen2)' == 'true'" /> |
66 |
| - |
67 |
| - <!-- Publish crossgen2 on supported platforms. --> |
68 |
| - |
69 |
| - <MSBuild Condition="'$(UsePublishedCrossgen2)' == 'true'" |
70 |
| - Targets="Restore" |
71 |
| - BuildInParallel="true" |
72 |
| - Properties="NativeAotSupported=$(NativeAotSupported);UseNativeAotForComponents=$(UseNativeAotForComponents);ToolsConfiguration=$(_toolsConfiguration);MSBuildRestoreSessionId=$([System.Guid]::NewGuid())" |
73 |
| - Projects="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Crossgen2.sfxproj" /> |
74 |
| - |
75 |
| - <MSBuild Condition="'$(UsePublishedCrossgen2)' == 'true'" |
76 |
| - Targets="PublishToDisk" |
77 |
| - BuildInParallel="true" |
78 |
| - Properties="NativeAotSupported=$(NativeAotSupported);UseNativeAotForComponents=$(UseNativeAotForComponents);ToolsConfiguration=$(_toolsConfiguration);OutputPath=$(CORE_ROOT)\crossgen2;LibrariesConfiguration=$(LibrariesConfiguration)" |
79 |
| - Projects="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Crossgen2.sfxproj" /> |
80 |
| - |
81 | 40 | <ItemGroup>
|
82 | 41 | <RunTimeDependencyCopyLocal Include="@(RuntimeCopyLocalItems)" />
|
83 | 42 | <RunTimeDependencyCopyLocal Include="@(NativeCopyLocalItems)" />
|
|
123 | 82 | <RunTimeArtifactsIncludeFolders Include="IL/" TargetDir="IL/" />
|
124 | 83 |
|
125 | 84 | <!-- Used for Crossgen2 R2R tests -->
|
126 |
| - <RunTimeArtifactsIncludeFolders Include="crossgen2/" TargetDir="crossgen2/" Condition="'$(UsePublishedCrossgen2)' != 'true'"> |
| 85 | + <RunTimeArtifactsIncludeFolders Include="crossgen2-published/" TargetDir="crossgen2/"> |
127 | 86 | <IncludeSubFolders>True</IncludeSubFolders>
|
128 | 87 | </RunTimeArtifactsIncludeFolders>
|
129 | 88 |
|
|
0 commit comments