-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
Turn on ReadyToRun
#12361
Turn on ReadyToRun
#12361
Changes from 3 commits
e9acd1e
85fe743
948b5f8
c8e33d0
fd7bac4
9b264a9
86a53e4
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 |
---|---|---|
|
@@ -414,10 +414,11 @@ Fix steps: | |
|
||
# handle ResGen | ||
# Heuristic to run ResGen on the fresh machine | ||
if ($ResGen -or -not (Test-Path "$PSScriptRoot/src/Microsoft.PowerShell.ConsoleHost/gen")) { | ||
Write-Log "Run ResGen (generating C# bindings for resx files)" | ||
Start-ResGen | ||
} | ||
# TODO: remove Start-ResGen after testing ReadyToRun | ||
#if ($ResGen -or -not (Test-Path "$PSScriptRoot/src/Microsoft.PowerShell.ConsoleHost/gen")) { | ||
# Write-Log "Run ResGen (generating C# bindings for resx files)" | ||
# Start-ResGen | ||
#} | ||
|
||
# Handle TypeGen | ||
# .inc file name must be different for Windows and Linux to allow build on Windows and WSL. | ||
|
@@ -2361,29 +2362,7 @@ function Start-CrossGen { | |
"Microsoft.ApplicationInsights.dll" | ||
) | ||
|
||
# Common PowerShell libraries to crossgen | ||
$psCoreAssemblyList = @( | ||
"pwsh.dll", | ||
"Microsoft.PowerShell.Commands.Utility.dll", | ||
"Microsoft.PowerShell.Commands.Management.dll", | ||
"Microsoft.PowerShell.Security.dll", | ||
"Microsoft.PowerShell.ConsoleHost.dll", | ||
"System.Management.Automation.dll" | ||
) | ||
|
||
# Add Windows specific libraries | ||
if ($environment.IsWindows) { | ||
$psCoreAssemblyList += @( | ||
"Microsoft.PowerShell.CoreCLR.Eventing.dll", | ||
"Microsoft.WSMan.Management.dll", | ||
"Microsoft.WSMan.Runtime.dll", | ||
"Microsoft.PowerShell.Commands.Diagnostics.dll", | ||
"Microsoft.PowerShell.GraphicalHost.dll", | ||
"Microsoft.Management.Infrastructure.CimCmdlets.dll" | ||
) | ||
} | ||
|
||
$fullAssemblyList = $commonAssembliesForAddType + $psCoreAssemblyList | ||
$fullAssemblyList = $commonAssembliesForAddType | ||
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. It seems we should disable Start-CrossGen function. 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. We should probably disable 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. Done. 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. CrossGen and ReadyToRun are the same thing, well, it's a switch to crossgen. 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. We can use 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. @iSazonov crossgen with a switch is what is used to generate readytorun binaries in the dotnet project 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. And I switched us to that method, but per DotNet we need to use the csproj if we want our symbols to work: https://github.com/PowerShell/PowerShell/blob/master/build.psm1#L2217 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. But can your explain why crossgen should be disabled on the rest of the binaries? 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. I forgot that we also crossgen assemblies not part of the build that we include in the package. We should probably still crossgen those. 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. This make sense for third-party assemblies. For PSReadline and MI we could move to R2R format.
With |
||
|
||
foreach ($assemblyName in $fullAssemblyList) { | ||
$assemblyPath = Join-Path $PublishPath $assemblyName | ||
|
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.
Please revert this change. This is the wrong PR
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.
Oops, sorry.