Skip to content
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

Publish ILC as a trimmed+R2R+singlefile executable #73987

Merged
merged 2 commits into from
Aug 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/liveBuilds.targets
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<PropertyGroup>
<CoreCLRSharedFrameworkDir>$([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', 'sharedFramework'))</CoreCLRSharedFrameworkDir>
<CoreCLRCrossgen2Dir>$([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', 'crossgen2'))</CoreCLRCrossgen2Dir>
<CoreCLRILCompilerDir>$([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', 'ilc'))</CoreCLRILCompilerDir>
<CoreCLRILCompilerDir>$([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', 'ilc-published'))</CoreCLRILCompilerDir>
<CoreCLRCrossILCompilerDir Condition="'$(TargetArchitecture)' != '$(BuildArchitecture)'">$([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', '$(BuildArchitecture)', 'ilc'))</CoreCLRCrossILCompilerDir>
<CoreCLRAotSdkDir>$([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', 'aotsdk'))</CoreCLRAotSdkDir>
<CoreCLRBuildIntegrationDir>$([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', 'build'))</CoreCLRBuildIntegrationDir>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<AssemblyName>ILCompiler.Build.Tasks</AssemblyName>
<TargetFramework>netstandard2.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>$(RuntimeBinDir)/ilc/netstandard</OutputPath>
<OutputPath>$(RuntimeBinDir)/ilc-published/netstandard</OutputPath>
<Configurations>Debug;Release;Checked</Configurations>
<PlatformTarget>AnyCPU</PlatformTarget>

Expand Down
24 changes: 24 additions & 0 deletions src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,28 @@
</PropertyGroup>

<Import Project="ILCompiler.props" />


<!-- BEGIN: Workaround for https://github.com/dotnet/runtime/issues/67742 -->
<PropertyGroup>
<PublishDir>$(RuntimeBinDir)ilc-published/</PublishDir>
<PublishTrimmed>true</PublishTrimmed>
<PublishReadyToRun>true</PublishReadyToRun>
<PublishSingleFile>true</PublishSingleFile>
</PropertyGroup>

<Target Name="PublishCompiler"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the publish going to use live-built runtime or the LKG runtime from https://github.com/dotnet/runtime/blob/main/global.json ?

If it is the later, is this going to have fallout for servicing and source build?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's using the LKG.

We update the LKG as part of servicing, so the expectation is that we'll ship this on top of RC1 (like we did .NET 6), and upgrade to RTM for the next servicing release (we'll be always a build behind).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But yes, this would definitely be an issue for source build and doing #67742 would be a ship blocker then. I have another email thread on the fate of source build. People above my paygrade need to make decisions on what to keep in 7.0.

Condition="'$(BuildingInsideVisualStudio)' != 'true'"
AfterTargets="Build"
DependsOnTargets="Publish;StompSingleFileHostPath" />

<!-- HACK: liveBuilds stomps over SingleFileHostSourcePath, setting it to the host that we just built.
That's unfortunate because it's not the host we're supposed to use here. -->
<Target Name="StompSingleFileHostPath"
BeforeTargets="ResolveFrameworkReferences">
<PropertyGroup>
<SingleFileHostSourcePath></SingleFileHostSourcePath>
</PropertyGroup>
</Target>
<!-- END: Workaround for https://github.com/dotnet/runtime/issues/67742 -->
</Project>