macOS deployment target support for gcc and clang#1468
macOS deployment target support for gcc and clang#1468starkos merged 2 commits intopremake:masterfrom
Conversation
Use the value of systemversion to set the Apple-specific gcc/clang option -mmacosx-version-min=<version>, equivalent of the Xcode setting MACOSX_DEPLOYMENT_TARGET add tests for gcc and clang
samsinsane
left a comment
There was a problem hiding this comment.
The implementations for Clang and GCC differs quite a lot to the XCode implementation.
|
It would probably be better if you validate at the point where the value is set, to make it easier for the script author to fix it? Here's an example of how to do it. |
The allowed values depends on project configuration (mainly os target). As I understand it, the "allowed" function only know the input value. |
|
Personally, I'm against validating version numbers - to me, it's just Premake getting in the way of the user when they know exactly what the version needs to be. |
|
Validation has been removed in the new commit |
|
PR looks good to me, but I'll let @starkos chime in on the validation before this is merged. |
Use the value of systemversion to set the Apple-specific gcc/clang option -mmacosx-version-min=, equivalent of the Xcode setting MACOSX_DEPLOYMENT_TARGET
add tests for gcc and clang
How does this PR change Premake's behavior?
add -mmacosx-version-min= build flag on macOS when the project defines a systemversion.
Are there any breaking changes? Will any existing behavior change?
This flag will be added in all actions that use the gcc/clang getcflags and getcxxflags method. The Xcode action doesn't. It already has a similar behavior but use a Xcode setting insteaod.
Anything else we should know?
Tested on a real project on Linux (no changes) and macOS .
Add any other context about your changes here.
Did you check all the boxes?
closes #XXXXin comment to auto-close issue when PR is merged)You can now support Premake on our OpenCollective. Your contributions help us spend more time responding to requests like these!