-
-
Notifications
You must be signed in to change notification settings - Fork 586
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
[3.x] Unify bits, macos_arch into arch, support non-x86 on Linux #714
base: 3.x
Are you sure you want to change the base?
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.
Just learning from your work. Thanks nice job!
1b74ca6
to
822c5ca
Compare
822c5ca
to
b3b80b1
Compare
b6dfe9a
to
2646cda
Compare
2646cda
to
5e00a58
Compare
5e00a58
to
ea835c9
Compare
ea835c9
to
4f2e4dd
Compare
Oh sorry, I completely missed that I was reviewing a So my points about removing support for the old arguments were maybe not so good, it's probably not a good idea to break compat in 3.6 when it's the 7th and last minor release of the 3.x series. So we should maybe bring them back... that being said I'm not too convinced of the value of doing this change at all for 3.6 only. And so my above review comments actually apply to #759 which should be further updated to sync with what we ended up merging in godotengine/godot. |
4f2e4dd
to
c8aeca4
Compare
Un-updated this PR to be similar to what it was before except the Linux architecture changes are still gone and the |
c8aeca4
to
900a4d0
Compare
Rebased the PR to resolve conflicts. If we want to support non-x86 architectures on Windows and Linux in Godot 3.6, this PR is useful. Users would have to adjust the |
900a4d0
to
2638dd5
Compare
2638dd5
to
e55a48e
Compare
This PR unifies arguments for bits and macos_arch, replacing them with one "arch" argument. This simplifies the code and adds support for ARM64 and RV64 Linux (PPC64 may or may not work, completely untested).
I did not change the behavior for Android and iOS to avoid unintentional breakage, but for other platforms this does intentionally break compatibility with the files produced by the build system, so users will need to adjust their
.gdnlib
files (or just not upgrade to the godot-cpp commit that includes this PR).On Windows and Linux, either
bits
orarch
can be used to specify the architecture.bits=32
is treated the same asarch=x86_32
andbits=64
is treated the same asarch=x86_64
. On macOS,bits
does nothing, and eitherarch
ormacos_arch
can be used to specify the architecture (defaults to universal, can also be set to x86_64 or arm64).I tested compiling x86_64 Windows, universal/x86_64/arm64 macOS, x86_32/x86_64/arm64/rv64 Ubuntu Linux, and the web platform (the suffix changes from wasm to wasm32).
Old PR description (previously it modified Android and iOS too and removed the old build options):
This PR unifies arguments for bits, android_arch, macos_arch, and ios_arch, replacing them all with one "arch" argument. This simplifies the code and adds support for ARM64 and RV64 Linux (PPC64 may or may not work, completely untested).
This breaks build system compatibility, since now those arguments do nothing, and you need to write "arch=" instead to specify the architecture. However, most users will not need to do this anyway since it will default to a good choice (universal for macOS, arm64 for Android and iOS, wasm32 on web, otherwise host arch). Also, this breaks compatibility with the final library name, so users will need to minorly adjust their projects.
To test it, here is a version built on the 3.4 branch: https://github.com/aaronfranke/godot-cpp/tree/3.4-scons-cpu-arch
And here is a branch of the demos using that 3.4 branch: https://github.com/aaronfranke/gdnative-demos/tree/scons-cpu-arch
I tested the demos using the 3.4 version on x86_64 Windows, universal/x86_64/arm64 macOS, x86_32/x86_64/arm64/rv64 Ubuntu Linux, and I tested compiling without running with arm64/x86_64 Android and arm32/arm64 iOS. I wasn't able to get the JavaScript platform working either with or without these changes. Overall, this PR tries to not overhaul the SConstruct file too much and just improves the architecture handling, so hopefully what was working will keep working.
This PR also updates the headers to the 3.x branch of the headers repo, updates the CI to use 3.5 beta1, and updates the test project SConstruct to be a copy of the SConstruct files in the gdnative-demos repository.