-
-
Notifications
You must be signed in to change notification settings - Fork 618
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for Premake on macOS universal binary #1629
Added support for Premake on macOS universal binary #1629
Conversation
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 main issue with supporting a universal binary for macOS is that supporting the M1 requires macOS 11.0 minimum. Should we continue to build an x86_64 only binary with whatever version of macOS we target, but also build a universal binary with an 11.0 requirement?
It may be a matter of opinion whether Premake needs to support universal binaries right now or not. |
ARM has definitely got momentum; we're probably going to have support it for all platforms soon. I don't want to require macOS 11.0 yet, so this will need to be a switch of some kind. What about a new command line flag like |
I wrote the source code to try it out. master...tempura-sukiyaki:premake-arch However, I do not have a Linux environment, so I have not been able to verify that this works correctly on Linux. In Visual Studio, I think it might be better to ignore this option and always include all platforms. |
I added the If you want to build ARM64 binaries, you can write the following.
Also, to build the universal binary on macOS, write the following make -f Bootstrap.mak osx PLATFORM=Universal On Linux, I didn't know how to specify the architecture, so I didn't do anything. Adding the following statement to premake5.lua did not seem to work. filter { "system:linux", "options:arch=ARM" }
architecture "ARM"
filter { "system:linux", "options:arch=ARM64" }
architecture "ARM64"
filter { "system:linux", "options:arch=x86 or arch=Win32" }
architecture "x86"
filter { "system:linux", "options:arch=x86_64 or arch=x64" }
architecture "x86_64" Translated with www.DeepL.com/Translator (free version) |
What's the status on this PR? |
What does this PR do?
This change allows Premake to be built for Arm64/x86_64 universal binaries on macOS.
How does this PR change Premake's behavior?
Premake runs on Arm64 on Macs using the Apple M1 processor.
There are no other changes.
Anything else we should know?
Building universal binaries requires Xcode Command Line Tools version 12.2 or later.
Did you check all the boxes?
closes #XXXX
in comment to auto-close issue when PR is merged)