cli-lab icon indicating copy to clipboard operation
cli-lab copied to clipboard

Create a macOS universal binary

Open baronfel opened this issue 1 year ago • 2 comments

Adds a target that

  • creates arch-specific macos binaries
  • stitches them together using lipo 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

baronfel avatar Oct 24 '24 16:10 baronfel

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_64
dotnet-core-uninstall (for architecture arm64):	Mach-O 64-bit executable arm64

baronfel avatar Oct 29 '24 17:10 baronfel

Don't think we do notarization for this.

joeloff avatar Oct 29 '24 17:10 joeloff