Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Create a macOS universal binary#313

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
baronfel wants to merge4 commits intomain
base:main
Choose a base branch
Loading
frommacos-universal-binary

Conversation

baronfel
Copy link
Member

Adds a target that

  • creates arch-specific macos binaries
  • stitches them together usinglipo to create a universal binary (thanks@rolfbjarne!)

Things we need to think about:

  • how are these signed/notarized?
  • how is the universal binary passed to the rest of the build process in the azdo pipelines?
  • How does the azdo pipeline on mac call the build? Because we'd need it to either call this new target directly or have this target be a dependency of the existing build entry point

cc@joeloff /@marcpopMSFT

<_LipoOuputPath>$(PublishDir)\osx-universal\$(AssemblyName)</_LipoOuputPath>
</PropertyGroup>

<Exec Command="lipo @(_RidSpecificSingleFile, ' ') -create -output $(_LipoOuputPath)" Condition="$([MSBuild]::IsOSPlatform('OSX'))" />
Copy link
Member

Choose a reason for hiding this comment

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

I don't know if you care, but this won't work if any of these paths have spaces in them.

@baronfel
Copy link
MemberAuthor

Tested this on a m2 machine and it works as expected:

% file dotnet-core-uninstall dotnet-core-uninstall: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64:Mach-O 64-bit executable arm64]dotnet-core-uninstall (for architecture x86_64):Mach-O 64-bit executable x86_64dotnet-core-uninstall (for architecture arm64):Mach-O 64-bit executable arm64

@joeloff
Copy link
Member

Don't think we do notarization for this.

@@ -37,4 +37,23 @@
</EmbeddedResource>
</ItemGroup>

<Target Name="PublishMacOSUniversalBinary">
Copy link
Member

Choose a reason for hiding this comment

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

who/what calls this target?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I need help making the macOS build call this - it's one of the questions in the issue description :)

Copy link
Member

Choose a reason for hiding this comment

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

probably here:https://github.com/dotnet/cli-lab/blob/25e91f1d39ad446131c0fe4bc998c5a33e766773/.vsts-ci.yml#L137C1-L144C33

You can tweak the .yml, then push your branch internal to trigger an official build against your branch, that's the only way to verify yaml changes

@edvilmeedvilmeforce-pushed themacos-universal-binary branch from9aa602d to9256923CompareApril 4, 2025 20:17
@edvilmeedvilmeforce-pushed themacos-universal-binary branch from9256923 toe0ea109CompareApril 4, 2025 20:21
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@rolfbjarnerolfbjarnerolfbjarne left review comments

@joeloffjoeloffjoeloff left review comments

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@baronfel@joeloff@rolfbjarne

[8]ページ先頭

©2009-2025 Movatter.jp