-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retry publish crossgen as AOT (#65948) #67636
Changes from all commits
64c286c
66c295d
0de9ffa
5a229cf
8a52522
9dd8701
21ebeb9
aa7c940
e33ee7a
ecf61b1
802acb6
bf5fb36
8d658ee
237fe3c
fbc260a
a55404e
8a8a8a5
7466f7f
fd8e054
8e6d6b2
ebee79f
cf41668
1471d40
3f39bf6
558ea09
0cbba11
5e9ece4
e26dc43
92d1909
aaffc19
4dacc8f
edc4682
ddf892e
995c63f
6caf24a
c2ae019
cf0e37a
4d09845
ab11405
850d708
c824ec9
0c492e7
3d16f41
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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> | ||
agocke marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<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" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider to add a TODO to track consolidating this logic with targetingpack.targets and/or create a tracking issue for it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I'll file a tracking issue. |
||
Condition="'$(RunningPublish)' == 'true'" | ||
DependsOnTargets="ResolveRuntimeFilesFromLocalBuild" | ||
BeforeTargets="ResolveRuntimePackAssets"> | ||
<ItemGroup> | ||
<!-- Remove AspNetCore runtime pack since we don't build it locally --> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is removing the AspNetCore runtime pack actually necessary? I never hit issue with it being available as long as no projects use it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ping @agocke for that question There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @agocke did you see that question? :) |
||
<ResolvedRuntimePack Remove="Microsoft.AspNetCore.App.Runtime.$(RuntimeIdentifier)" /> | ||
|
||
<ResolvedRuntimePack Update="Microsoft.NETCore.App.Runtime.$(RuntimeIdentifier)"> | ||
<PackageDirectory>$(MicrosoftNetCoreAppRuntimePackDir)</PackageDirectory> | ||
</ResolvedRuntimePack> | ||
</ItemGroup> | ||
</Target> | ||
|
||
</Project> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@am11 just to double check, does that change look right to you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@agocke, could you tell what is this fixing?
IMO, we should run official build against the PR as we did previously so we can get some confidence from the package validation step.
ps - what I learned previously about this part of the configuration (
<PropertyGroup Label="CalculateOS">
) is that it is very tricky to be sure about. And when everything was green (incl. outerloop and official builds), it broke Tizen, which was reported few days later. 😁There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes, the problem is that PackageRID was
linux-x64
on alpine, when it should belinux-musl-x64
.