-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build the "in build" crossgen2 into a pack that we can use within the…
… VMR (#110676) * Add a new crossgen2 build variant for a published crossgen2 targetting the host OS * Remove the .NET-hosted in-build crossgen2 and just use the published in-build host-targeting crossgen2. * Extract crossgen2 sfxproj changes from #109710 * Extract the properties and targets that will be shared into a separate props file. * Add a "host crossgen2" project * Add the crossgen2 host package to Subsets.props for the correct scenarios. * Fix crossgen-corelib to work with the new in-build crossgen2 * Publish the in-build crossgen2 as single file to avoid having to adjust the AOT-in-build logic to handle AOT-ing for the host. * AOT on Windows only * Don't set Platform for the shared framework projects. It's not necessary and it breaks the new crossgen2 host package * Forward ShortStack down so we don't build the host crossgen2 when runtime is the last repo. * Add os-only RID to portable RID graph in source-build to enable crossgen2 tasks in the SDK to discover the target OS from the source-build target RID * Publish the host crossgen2 as a "Vertical" visibility asset. * Cleanup crossgen2 infra, add comment about workaround, and adjust publishing to publish packages as packages. * Deduplicate artifacts * Add back the Update, somehow this got lost. * Don't forward down ShortStack * Use new "update" functionality to specify which artifacts are vertical visibility * Revert changes to Signing.props * Remove workaround now that the VMR has a bootstrap SDK with a new enough version. --------- Co-authored-by: Viktor Hofer <[email protected]>
- Loading branch information
1 parent
0df31bc
commit 71db8b2
Showing
12 changed files
with
106 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,20 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<Project Sdk="Microsoft.NET.Sdk" DefaultTargets="Publish;PublishItemsOutputGroup"> | ||
<PropertyGroup> | ||
<CrossHostArch Condition="'$(CrossBuild)' == 'true' or '$(TargetArchitecture)' != '$(BuildArchitecture)' or '$(HostOS)' != '$(TargetOS)' or '$(EnableNativeSanitizers)' != ''">$(BuildArchitecture)</CrossHostArch> | ||
<OutputPath>$(RuntimeBinDir)/$(BuildArchitecture)/crossgen2/</OutputPath> | ||
<TargetFramework>$(NetCoreAppToolCurrent)</TargetFramework> | ||
<UseAppHost>false</UseAppHost> | ||
<_IsPublishing>true</_IsPublishing> | ||
<RuntimeIdentifier>$(NETCoreSdkRuntimeIdentifier)</RuntimeIdentifier> | ||
<PublishDir>$(RuntimeBinDir)$(BuildArchitecture)/crossgen2/</PublishDir> | ||
<SelfContained>true</SelfContained> | ||
<PublishTrimmed>true</PublishTrimmed> | ||
<!-- | ||
Publish with AOT on Windows as Single file doesn't work well when an app has to include DiaSymReader.Native. | ||
Publish single-file elsewhere so we don't need to adjust our "AOT in build" logic to handle targeting the SDK RID. | ||
--> | ||
<PublishAot Condition="$(NETCoreSdkPortableRuntimeIdentifier.StartsWith('win-'))">true</PublishAot> | ||
<PublishSingleFile Condition="'$(PublishAot)' != 'true'">true</PublishSingleFile> | ||
<PublishReadyToRun>true</PublishReadyToRun> | ||
<PublishReadyToRunComposite>true</PublishReadyToRunComposite> | ||
<TrimmerSingleWarn>false</TrimmerSingleWarn> | ||
</PropertyGroup> | ||
<Import Project="crossgen2.props" /> | ||
</Project> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.Host.sfxproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<Sdk Name="Microsoft.DotNet.SharedFramework.Sdk" /> | ||
|
||
<PropertyGroup> | ||
<CrossgenPublishProject>$(RepoRoot)src/coreclr/tools/aot/crossgen2/crossgen2_inbuild.csproj</CrossgenPublishProject> | ||
<RuntimeIdentifier>$(NETCoreSdkRuntimeIdentifier)</RuntimeIdentifier> | ||
<IsShipping>false</IsShipping> | ||
</PropertyGroup> | ||
|
||
<Import Project="$(MSBuildThisFileDirectory)Microsoft.NETCore.App.Crossgen2.props" /> | ||
</Project> |
53 changes: 53 additions & 0 deletions
53
src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Crossgen2.props
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<!-- Crossgen is not used for Mono --> | ||
<SkipBuild Condition="'$(RuntimeFlavor)' == 'Mono'">true</SkipBuild> | ||
<PlatformPackageType>ToolPack</PlatformPackageType> | ||
<SharedFrameworkName>$(SharedFrameworkName).Crossgen2</SharedFrameworkName> | ||
<OverridePackageId>$(SharedFrameworkName).$(RuntimeIdentifier)</OverridePackageId> | ||
<ArchiveName>dotnet-crossgen2</ArchiveName> | ||
<SharedFrameworkHostFileNameOverride>crossgen2</SharedFrameworkHostFileNameOverride> | ||
<GenerateInstallers>false</GenerateInstallers> | ||
<PermitDllAndExeFilesLackingFileVersion>true</PermitDllAndExeFilesLackingFileVersion> | ||
<!-- Publishing as single-file or NativeAOT means we can't examine the interior DLLs --> | ||
<ShouldVerifyClosure>false</ShouldVerifyClosure> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference | ||
Include="$(CrossgenPublishProject)" | ||
OutputItemType="_RawCrossgenPublishFiles" | ||
ReferenceOutputAssembly="false" /> | ||
</ItemGroup> | ||
|
||
<Target Name="PublishCrossgen" | ||
BeforeTargets="GetFilesToPackage"> | ||
<ItemGroup> | ||
<_CrossgenPublishFiles Include="@(_RawCrossgenPublishFiles->'%(OutputPath)')" | ||
KeepMetadata="REMOVE_ALL" /> | ||
</ItemGroup> | ||
<ItemGroup Condition="'$(NativeAotSupported)' != 'true'"> | ||
<FilesToPackage Include="@(_CrossgenPublishFiles)" | ||
Exclude="*.pdb;*.h;*.lib" | ||
TargetPath="tools/" /> | ||
</ItemGroup> | ||
<ItemGroup Condition="'$(NativeAotSupported)' == 'true'"> | ||
<!-- Treat all native aot assets as native runtime assets --> | ||
<FilesToPackage Include="@(_CrossgenPublishFiles->Distinct())" | ||
Condition="'%(Extension)' != '.pdb'" | ||
TargetPath="tools/" /> | ||
</ItemGroup> | ||
</Target> | ||
|
||
<Target Name="AddCrossgen2SymbolFilesToPackage" BeforeTargets="GetFilesToPackage" DependsOnTargets="PublishCrossgen"> | ||
<ItemGroup> | ||
<_Crossgen2SymbolFilesToPackage Include="@(_CrossgenPublishFiles)" Condition="'%(Extension)' == '.pdb'" /> | ||
<!-- Symbol files for JIT libraries are placed in a different location for Windows builds --> | ||
<_Crossgen2SymbolFilesToPackage Include="@(NativeRuntimeAsset->'$(CoreCLRArtifactsPdbDir)%(FileName).pdb')" Condition="'$(TargetOS)' == 'windows' and '%(FileName)' != 'crossgen2'" /> | ||
<_Crossgen2SymbolFilesToPackage Include="@(NativeRuntimeAsset->'$(CoreCLRArtifactsPath)%(FileName)%(Extension)$(SymbolsSuffix)')" Condition="'$(TargetOS)' != 'windows' and '%(FileName)' != 'crossgen2'" /> | ||
<_Crossgen2SymbolFilesToPackage Remove="@(_Crossgen2SymbolFilesToPackage)" Condition="!Exists('%(Identity)')" /> | ||
|
||
<_SymbolFilesToPackage Include="@(_Crossgen2SymbolFilesToPackage)" TargetPath="tools/" /> | ||
</ItemGroup> | ||
</Target> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters