-
-
Notifications
You must be signed in to change notification settings - Fork 584
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
Unify bits, android_arch, macos_arch ios_arch into arch, support non-x86 Linux #759
Conversation
The required modification to the |
@Faless Breaking other projects is unavoidable with this change, since the point is to change this. But Godot 4 isn't stable yet, so this is acceptable. We could update the test project |
It should already work with |
03050db
to
ffdd2d6
Compare
Unify arguments and add support for ARM64 and RV64 Linux
ffdd2d6
to
e5c4351
Compare
This PR has discovered a pre-existing engine bug where the |
Weird, I thought I had tested it, well, we should fix it upstream, I can have a look if you wish :) |
I haven't tested it yet but I made this. |
Is it not loading the library, or not exporting it? Export plugin probably have only |
|
Oh, that's why it worked for me, it's MSVC not having |
Well, it shouldn't crash the engine, I mean, missing gdextension libraries are not supposed to. |
Opened this PR, needs testing: godotengine/godot#61732 |
This PR is the
master
/ 4.x version of #714, and is similar to 55778 in the engine repo.In the current master branch of godot-cpp, we have several arguments for specifying the architecture:
bits
,ios_arch
,macos_arch
, andandroid_arch
. This is a bit of a mess, so this PR replaces all of these with a single unifiedarch
.The list of valid architectures is
["", "universal", "x86_32", "x86_64", "arm32", "arm64", "rv64", "ppc32", "ppc64", "wasm32"]
. The names were chosen to be explicit such that each architecture always includes the bitness in the name (except universal, which contains multiple architectures).If
""
, then it will automatically determine the architecture. It will use universal for macOS and iOS, arm64 for Android, wasm32 for JavaScript, and otherwise it will use the host architecture, so arm64 on modern ARM devices, x86_64 on a typical modern desktop, and x86_32 on an old 32-bit desktop. Most users won't have to specifyarch
manually because it will be automatically selected.For macOS, iOS, JavaScript, and Android, it will throw an error if trying to build for an invalid architecture. The same should be done for Windows and Linux but I'm not sure how to get cross-compiling working in all cases where it should exist or how to show an error when the necessary libs etc are missing.
This PR does NOT require engine changes to work.The engine can already recognize the namesx86_64
etc because it checks these names via the list of supported features in the OS class. There are a few cases where the names are still not quite the same, likex86_32
isn't recognized, but these inconsistencies can be fixed later in the engine code independently of this PR.I have tested this on Windows x86_64 (works fine before/after this PR), macOS x86_64 (builds with errors before/after this PR), macOS arm64 (builds fine but crashes at runtime before/after this PR), Linux x86_64 (works fine before/after this PR), Linux arm64 and Linux rv64 (doesn't work without this PR, but does work with this PR). PowerPC is untested, and I was not able to get the web / javascript platform working with or without this PR.
This PR also updates the test project to the latest Godot master.