Enable building PowerShell for Apple M1 runtime#14923
Enable building PowerShell for Apple M1 runtime#14923TravisEz13 merged 1 commit intoPowerShell:masterfrom
Conversation
|
So does this build a universal binary or just one compiled for arm64? Does it require any work from .NET, I remember reading something about M1 support in the new preview so assumed PowerShell had to wait for that. |
|
@jborean93 This PR leverages dotnet to build M1 optimized binaries. It depends on PowerShell/PowerShell-Native#64 which builds universal native binaries for pwsh. For "universal binaries" we could just have a MSIL non-crossgen'd package, but startup speed is greatly affected. |
|
Awesome thanks for the info, will have to get a move on updating the mi fork to produce arm64 libraries so powershell can use them. |
build.psm1
Outdated
There was a problem hiding this comment.
Is this 'tools' path filter just for macOS, or for all runtimes? I assume the latter, but it is not clear to me. Maybe add a comment to reassure.
There was a problem hiding this comment.
The tools folder is for all runtimes, but for some reason, x64-arm64 for macOS has a crossgen in that additional runtime folder which is discovered, but doesn't actually work. The one in tools does work.
|
Would you submit another PR to update the release build or add that to this PR? |
|
@TravisEz13 I can update this PR to also do the build, was using this to test locally |
|
@TravisEz13 I spent some time looking at the yml and psm1 that does the build, but it's much more complicated now than the last time I made changes. I would suggest having it integrated with the build as a separate PR. |
|
@SteveL-MSFT is this ready to merge? Don't we need the updated native nuget? |
|
The description says it is dependent on the PR in PS-Native repo. The NuGet package after merging that that PR has to be released too. |
|
For the full package to work, it requires the universal binary from powershell-native, however, this PR itself can be merged. @anmenaga can you do a separate PR to enable building of the M1 pkg? |
|
🎉 Handy links: |
PR Summary
Add support to
Start-PSBuildwith runtimeosx-arm64. Requires PowerShell/PowerShell-Native#64 to be published first. A local build of both works. When looking for crossgen, there appears to be one found underx64-arm64folder which fails, but the one in the parenttoolsfolder works so need to filter that out for when finding crossgen.PR Context
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.(which runs in a different PS Host).