-
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.
Retry publish crossgen as AOT (#67636)
Brings back the earlier change to publish crossgen as AOT with a fix for restore flakiness (#65948) Closes #60016 (cherry picked from commit 0d1e04b) Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com> Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
- Loading branch information
1 parent
c101540
commit 7ff3ac6
Showing
10 changed files
with
131 additions
and
75 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
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,62 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<Project> | ||
|
||
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" /> | ||
|
||
<PropertyGroup> | ||
<OutputPath>$(RuntimeBinDir)/crossgen2</OutputPath> | ||
<!-- The default value for macOS is false --> | ||
<UseAppHost>true</UseAppHost> | ||
<AppHostRuntimeIdentifier>$(Crossgen2PackageRID)</AppHostRuntimeIdentifier> | ||
<OutputPath>$(RuntimeBinDir)crossgen2</OutputPath> | ||
<!-- Can't use NativeAOT in source build yet https://github.com/dotnet/runtime/issues/66859 and we | ||
don't want to ship using NativeAOT on MacOS --> | ||
<NativeAotSupported Condition="'$(DotNetBuildFromSource)' == 'true' or '$(TargetOS)' == 'osx'">false</NativeAotSupported> | ||
<!-- Trimming is not currently working, but set the appropriate feature flags for NativeAOT --> | ||
<PublishTrimmed Condition="'$(NativeAotSupported)' == 'true'">true</PublishTrimmed> | ||
<RuntimeIdentifiers Condition="'$(RunningPublish)' != 'true' and '$(DotNetBuildFromSource)' != 'true'">linux-x64;linux-musl-x64;linux-arm;linux-musl-arm;linux-arm64;linux-musl-arm64;freebsd-x64;osx-x64;osx-arm64;win-x64;win-x86;win-arm64;win-arm</RuntimeIdentifiers> | ||
<RuntimeIdentifiers Condition="'$(DotNetBuildFromSource)' == 'true'">$(PackageRID)</RuntimeIdentifiers> | ||
<SelfContained>false</SelfContained> | ||
<SelfContained Condition="'$(RunningPublish)' == 'true'">true</SelfContained> | ||
</PropertyGroup> | ||
|
||
<Import Project="crossgen2.props" /> | ||
|
||
<PropertyGroup Condition="'$(NativeAotSupported)' != 'true'"> | ||
<PublishSingleFile>true</PublishSingleFile> | ||
<PublishReadyToRun>true</PublishReadyToRun> | ||
<!-- Disable crossgen on NetBSD, illumos and Solaris for now. This can be revisited when we have full support. --> | ||
<PublishReadyToRun Condition="'$(TargetOS)'=='NetBSD' Or '$(TargetOS)'=='illumos' Or '$(TargetOS)'=='Solaris'">false</PublishReadyToRun> | ||
<!-- Disable crossgen on FreeBSD when cross building from Linux. --> | ||
<PublishReadyToRun Condition="'$(TargetOS)'=='FreeBSD' and '$(CrossBuild)'=='true'">false</PublishReadyToRun> | ||
<PublishReadyToRunComposite>true</PublishReadyToRunComposite> | ||
</PropertyGroup> | ||
|
||
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" /> | ||
|
||
<PropertyGroup Condition="'$(NativeAotSupported)' == 'true'"> | ||
<IlcToolsPath>$(CoreCLRILCompilerDir)</IlcToolsPath> | ||
<IlcToolsPath Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)'">$(CoreCLRCrossILCompilerDir)</IlcToolsPath> | ||
<CppCompilerAndLinker Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)' and '$(HostOS)' != 'windows'">clang-9</CppCompilerAndLinker> | ||
<SysRoot Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)' and '$(HostOS)' != 'windows'">$(ROOTFS_DIR)</SysRoot> | ||
<IlcBuildTasksPath>$(CoreCLRILCompilerDir)netstandard/ILCompiler.Build.Tasks.dll</IlcBuildTasksPath> | ||
<IlcSdkPath>$(CoreCLRAotSdkDir)</IlcSdkPath> | ||
<IlcFrameworkPath>$(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)</IlcFrameworkPath> | ||
<IlcFrameworkNativePath>$(MicrosoftNetCoreAppRuntimePackNativeDir)</IlcFrameworkNativePath> | ||
<TrimmerSingleWarn>false</TrimmerSingleWarn> | ||
</PropertyGroup> | ||
|
||
<Import Project="$(R2ROverridePath)" Condition="'$(R2ROverridePath)' != ''" /> | ||
<Import Project="$(CoreCLRBuildIntegrationDir)Microsoft.DotNet.ILCompiler.targets" | ||
Condition="'$(NativeAotSupported)' == 'true' and '$(RunningPublish)' == 'true'" /> | ||
|
||
<Target Name="RewriteRuntimePackDir" | ||
Condition="'$(RunningPublish)' == 'true'" | ||
DependsOnTargets="ResolveRuntimeFilesFromLocalBuild" | ||
BeforeTargets="ResolveRuntimePackAssets"> | ||
<ItemGroup> | ||
<!-- Remove AspNetCore runtime pack since we don't build it locally --> | ||
<ResolvedRuntimePack Remove="Microsoft.AspNetCore.App.Runtime.$(RuntimeIdentifier)" /> | ||
|
||
<ResolvedRuntimePack Update="Microsoft.NETCore.App.Runtime.$(RuntimeIdentifier)"> | ||
<PackageDirectory>$(MicrosoftNetCoreAppRuntimePackDir)</PackageDirectory> | ||
</ResolvedRuntimePack> | ||
</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
Oops, something went wrong.