XcodesOrg / xcodes

The best command-line tool to install and switch between multiple versions of Xcode.
MIT License
3.68k stars 126 forks source link

Setting universal build #172

Closed fishcharlie closed 2 years ago

fishcharlie commented 2 years ago

Close #170

@MattKiazyk Might want to test this before merging. It looks like maybe the output executable might be in a different location. But since I'm not completely familiar with the build/distribution system of this project, I'm not sure that matters.

I was able to verify that the outputted executable from this PR does produce a universal binary tho.

Please let me know if any adjustments need to be made.

MattKiazyk commented 2 years ago

@fishcharlie 🙏 🙏

As far as I can tell this is working as advertised! We'll find out for sure next release, but I'll for sure double check on an M1 (now that I have one) and the old intel one

jpsim commented 2 years ago

Worked great for me on my M1, installed via the xcodes.zip archive from https://github.com/RobotsAndPencils/xcodes/releases/tag/0.20.0

$ file /usr/local/bin/xcodes
/usr/local/bin/xcodes: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64]
/usr/local/bin/xcodes (for architecture x86_64):    Mach-O 64-bit executable x86_64
/usr/local/bin/xcodes (for architecture arm64): Mach-O 64-bit executable arm64
MattKiazyk commented 2 years ago

👍 - it doubled the zip from 1.8 to 3.6 MB 😄

jpsim commented 2 years ago

By law, no one is allowed to complain about 3.6MB for a tool used to download 10+ GB files from the internet 😆