-
-
Notifications
You must be signed in to change notification settings - Fork 631
Add scons with_x86_64h option on macOS #1642
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
base: master
Are you sure you want to change the base?
Conversation
…ice for improved performance.
It may be nice to have an option to build only for x86_64h (instead of x86_64), to kill compatibility to older macs by choice. I opted not to add that because gdextensions should probably be fully compatible to everything godot is compatible with. |
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.
Thanks!
However, I'm not totally sure about including this in godot-cpp. How commonly would this be used?
If it won't be super common, I think extension authors who really want it could add this in their own SConstruct
files, we don't need to support it upstream
@@ -11,6 +12,7 @@ def has_osxcross(): | |||
def options(opts): | |||
opts.Add("macos_deployment_target", "macOS deployment target", "default") | |||
opts.Add("macos_sdk_path", "macOS SDK path", "") | |||
opts.Add(BoolVariable("with_x86_64h", "If arch=x86_64 or universal, include an x86_64h slice.", False)) |
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.
"with_" as a prefix for this option doesn't really fit with the naming of our other options. Maybe "use_x86_64h"?
Realistically, probably not a lot. |
This adds an x86_64h slice, which can lead to improved performance (at the cost of binary size).
It will be selected automatically on all post-2013 macs, if compiled. Pre 2013 macs will use the current x86_64 slice.
See godotengine/godot-proposals#11150 for details about this feature.
The x86_64h slice is compiled alongside the x86_64 slice and is fully and transparently compatible with x86_64 godot. Therefore, we don't need to wait for any progress on the godot front to add this feature.
Removing the slice to see if x86_64h can be selected: