GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Enable building PowerShell for Apple M1 runtime by SteveL-MSFT · Pull Request #14923 · PowerShell/PowerShell

Conversation

@SteveL-MSFT

@SteveL-MSFT Steve Lee (SteveL-MSFT) commented Feb 28, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

PR Summary

Add support to Start-PSBuild with runtime osx-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 under x64-arm64 folder which fails, but the one in the parent tools folder works so need to filter that out for when finding crossgen.

PR Context

PR Checklist

  • PR has a meaningful title
    • Use the present tense and imperative mood when describing your changes
  • Summarized changes
  • Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
  • This PR is ready to merge and is not Work in Progress.
    • If the PR is work in progress, please add the prefix WIP: or [ WIP ] to the beginning of the title (the WIP bot will keep its status check at Pending while the prefix is present) and remove the prefix when the PR is ready.
  • Breaking changes
    • None
    • OR
    • Experimental feature(s) needed
      • Experimental feature name(s):
  • User-facing changes
    • Not Applicable
    • OR
    • Documentation needed
      • Issue filed:
  • Testing - New and feature
    • N/A or can only be tested interactively
    • OR
    • Make sure you've added a new test if existing tests do not effectively test the code changed
  • Tooling
    • I have considered the user experience from a tooling perspective and don't believe tooling will be impacted.
    • OR
    • I have considered the user experience from a tooling perspective and opened an issue in the relevant tool repository. This may include:
      • Impact on PowerShell Editor Services which is used in the PowerShell extension for VSCode
        (which runs in a different PS Host).
        • Issue filed:
      • Impact on Completions (both in the console and in editors) - one of PowerShell's most powerful features.
        • Issue filed:
      • Impact on PSScriptAnalyzer (which provides linting & formatting in the editor extensions).
        • Issue filed:
      • Impact on EditorSyntax (which provides syntax highlighting with in VSCode, GitHub, and many other editors).
        • Issue filed:

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@SteveL-MSFT
Steve Lee (SteveL-MSFT) requested review from Travis Plunk (TravisEz13) and Aditya Patwardhan (adityapatwardhan) February 28, 2021 22:18
@SteveL-MSFT
Steve Lee (SteveL-MSFT) requested review from Andrew (anmenaga) and Dongbo Wang (daxian-dbw) as code owners February 28, 2021 22:18
@ghost ghost assigned Travis Plunk (TravisEz13) Feb 28, 2021
@jborean93

Jordan Borean (jborean93) commented Mar 1, 2021

Copy link
Copy Markdown
Collaborator

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@SteveL-MSFT

Steve Lee (SteveL-MSFT) commented Mar 1, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

Jordan Borean (@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.

jborean93 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jborean93

Jordan Borean (jborean93) commented Mar 1, 2021

Copy link
Copy Markdown
Collaborator

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.

SteveL-MSFT and iSazonov reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

PaulHigin
Paul Higinbotham (PaulHigin) reviewed Mar 1, 2021
View reviewed changes
Comment thread build.psm1 Outdated

@PaulHigin Paul Higinbotham (PaulHigin) Mar 1, 2021

Copy link
Copy Markdown
Contributor

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.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@SteveL-MSFT Steve Lee (SteveL-MSFT) Mar 2, 2021

Copy link
Copy Markdown
Member Author

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.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
TravisEz13
Travis Plunk (TravisEz13) approved these changes Mar 2, 2021
View reviewed changes
@TravisEz13
Travis Plunk (TravisEz13) marked this pull request as draft March 2, 2021 00:38
@TravisEz13

Travis Plunk (TravisEz13) commented Mar 2, 2021

Copy link
Copy Markdown
Member

Would you submit another PR to update the release build or add that to this PR?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@SteveL-MSFT

Steve Lee (SteveL-MSFT) commented Mar 2, 2021

Copy link
Copy Markdown
Member Author

Travis Plunk (@TravisEz13) I can update this PR to also do the build, was using this to test locally

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ghost ghost added the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Mar 5, 2021
@SteveL-MSFT
Enable building PowerShell for Apple M1 runtime
7f83eaa
@SteveL-MSFT
Steve Lee (SteveL-MSFT) force-pushed the build-m1 branch from dea89eb to 7f83eaa Compare March 6, 2021 00:15
@ghost ghost removed the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Mar 6, 2021
@SteveL-MSFT

Steve Lee (SteveL-MSFT) commented Mar 6, 2021

Copy link
Copy Markdown
Member Author

Travis Plunk (@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.

TravisEz13 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

PaulHigin
Paul Higinbotham (PaulHigin) approved these changes Mar 6, 2021
View reviewed changes
@SteveL-MSFT
Steve Lee (SteveL-MSFT) marked this pull request as ready for review March 6, 2021 01:31
@TravisEz13

Travis Plunk (TravisEz13) commented Mar 8, 2021

Copy link
Copy Markdown
Member

Steve Lee (@SteveL-MSFT) is this ready to merge? Don't we need the updated native nuget?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@adityapatwardhan

Aditya Patwardhan (adityapatwardhan) commented Mar 8, 2021

Copy link
Copy Markdown
Member

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@SteveL-MSFT

Steve Lee (SteveL-MSFT) commented Mar 9, 2021

Copy link
Copy Markdown
Member Author

For the full package to work, it requires the universal binary from powershell-native, however, this PR itself can be merged. Andrew (@anmenaga) can you do a separate PR to enable building of the M1 pkg?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@TravisEz13
Travis Plunk (TravisEz13) merged commit 727785c into PowerShell:master Mar 9, 2021
@SteveL-MSFT
Steve Lee (SteveL-MSFT) deleted the build-m1 branch March 10, 2021 22:51
@TravisEz13 Travis Plunk (TravisEz13) added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Mar 16, 2021
@TravisEz13 Travis Plunk (TravisEz13) added this to the 7.2.0-preview.4 milestone Mar 16, 2021
@ghost

Deleted user (ghost) commented Mar 16, 2021

Copy link
Copy Markdown

🎉v7.2.0-preview.4 has been released which incorporates this pull request.:tada:

Handy links:

  • Release Notes
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@iSazonov Ilya (iSazonov) mentioned this pull request Apr 4, 2021
Native support for Mac m1 #15146
Closed
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
@SteveL-MSFT
Enable building PowerShell for Apple M1 runtime (PowerShell#14923)
e7f3984
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@TravisEz13 Travis Plunk (TravisEz13) TravisEz13 approved these changes
@adityapatwardhan Aditya Patwardhan (adityapatwardhan) Awaiting requested review from adityapatwardhan
@anmenaga Andrew (anmenaga) Awaiting requested review from anmenaga
@daxian-dbw Dongbo Wang (daxian-dbw) Awaiting requested review from daxian-dbw
+1 more reviewer
@PaulHigin Paul Higinbotham (PaulHigin) PaulHigin approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@TravisEz13 Travis Plunk (TravisEz13)

Labels

CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log

Projects

None yet

Milestone

7.2.0-preview.4

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@SteveL-MSFT @jborean93 @TravisEz13 @adityapatwardhan @PaulHigin
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.