Repository navigation
Enable crossgen for PowerShell binaries on Windows and Linux - #1571
Conversation
There was a problem hiding this comment.
Please, use ParameterSetName=Publish. CrossGen is a feature of Publish mode, not vice-verce
There was a problem hiding this comment.
Good point. Fixed.
|
Please, update appveyor.yml (and later .travis.yml) to call CrossGen. |
|
🕐 |
There was a problem hiding this comment.
Switch with Mandatory=$true rarelly makes sense.
Please remove Mandatory for both $CrossGen and $RemoveILs
db3e608 to
9bfbec4
Compare
There was a problem hiding this comment.
I think this parameter should be mandatory
There was a problem hiding this comment.
Fixed.
|
Update AppVeyor.yml and travis.sh to use this funcitonality |
There was a problem hiding this comment.
This seems to be reverting sergei (@vors) changes from #1605
There was a problem hiding this comment.
Francisco Gamino (@Francisco-Gamino) please, rebase
99fb9d1 to
68df09f
Compare
68df09f to
e6618ec
Compare
|
Fixed for OS X. |
e6618ec to
2fe4801
Compare
499fc05 to
08e8966
Compare
There was a problem hiding this comment.
Same comment about consistent bracket. I suggest to ever fix it everywhere in the file or don't do this entirely.
There was a problem hiding this comment.
I did just fix it everywhere.
There was a problem hiding this comment.
My bad, I misread the diff
There was a problem hiding this comment.
Might have pushed it just as you commented.
|
LGTM |
It's a dylib, not a so.
c2e0709 to
f866f8b
Compare
|
We are a go! |
| # Add Windows specific libraries | ||
| if ($IsWindows) { | ||
| $psCoreAssemblyList += @( | ||
| "Microsoft.WSMan.Management.dll", |
There was a problem hiding this comment.
We should probably add a TODO to enable this once they are available on Linux.
There was a problem hiding this comment.
Nope, as sergei (@vors) commented previously, these libraries will not come to Linux. They are explicitly Windows specific.
There was a problem hiding this comment.
Ok. Then, we should be good to go.
Enable crossgen for PowerShell binaries on Windows and Linux
Native Image Generation for PowerShell libraries #1211
To generate ngen binaries for PowerShell, do the following:
ipmo .\build.psm1 -Force
Start-PSBuild -Publish -RemoveILs -CrossGen
This outputs:
publish: Published to C:\Users\frangom\Documents\GitHub\PowerShell\src\powershell-win-core\bin\Debug\netcoreapp1.0\win10-x64\publish
Published 1/1 projects successfully
Generating assembly Microsoft.PowerShell.Commands.Utility.ni.dll ...
Generating assembly Microsoft.PowerShell.Commands.Management.ni.dll ...
Generating assembly Microsoft.PowerShell.Security.ni.dll ...
Generating assembly Microsoft.PowerShell.CoreCLR.AssemblyLoadContext.ni.dll ...
Generating assembly Microsoft.PowerShell.CoreCLR.Eventing.ni.dll ...
Generating assembly Microsoft.PowerShell.ConsoleHost.ni.dll ...
Generating assembly Microsoft.PowerShell.LocalAccounts.ni.dll ...
Generating assembly Microsoft.PowerShell.Commands.Diagnostics.ni.dll ...
Generating assembly Microsoft.Management.Infrastructure.CimCmdlets.ni.dll ...
Generating assembly System.Management.Automation.ni.dll ...
PowerShell.exe with ngen binaries is available at C:\Users\frangom\Documents\GitHub\PowerShell/src/powershell-win-core\bin\Debug\netcoreapp1.0\win10-x64\publish\powershell.exe
After this, start PowerShell.exe from the following location: C:\Users\frangom\Documents\GitHub\PowerShell/src/powershell-win-core\bin\Debug\netcoreapp1.0\win10-x64\publish\powershell.exe
origin/master.Yes
No tests needed for this code change