-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Remove Android specific abis from the export preset feature list #84720
Remove Android specific abis from the export preset feature list #84720
Conversation
350527c
to
15fa826
Compare
These architectures/feature tags are meant to be the Godot-specific ones (arm32, arm64, x86_32, x86_64). I'm not sure we should start adding all the architectures identifiers which may be used on specific platforms there (e.g. aarch64 on Linux, x86-64 on macOS, x64 on Windows, etc.). Keeping it standardized would be good. Maybe we just shouldn't add Android-specific arch identifiers as feature tags? |
I would add a separate list of invalid architectures and skip ("unknown architecture" with error message) |
Or maybe we should require to always specify architecture, currently it's not the case for macOS and iOS (since binary can be universal), but we can require to specify |
That could be the approach; we add the Android specific ones automatically in the feature list when the Godot specific arch is selected, so we can either disable that logic or provide an error message to indicate to the user they can't be used in the gdextension config. |
To @akien-mga's point, the list would need to include the invalid architectures for all supported platforms to be consistent. |
The presence of those abis cause them to be included in the set of `p_features` passed to the `gdextension_export_plugin#_export_file(...)` method, which caused them to be lumped in the `features_wo_arch` set. When trying to find the gdextension library path, we use a predicate with the following logic: ``` [features_wo_arch, arch_tag](String p_feature) { return features_wo_arch.has(p_feature) || (p_feature == arch_tag); } ``` For a `gdextension` config file like the one below, this causes the first android entry (`android.armeabi-v7a = ...`) to always be returned regardless of archs since it always satisfies the predicate. ``` [configuration] entry_symbol = "example_library_init" compatibility_minimum = 4.1 [libraries] linux.x86_64 = "res://libgdexample.so" android.armeabi-v7a = "res://libgdexample.android.template_release.armeabi-v7a.so" android.arm32 = "res://libgdexample.android.template_release.armeabi-v7a.so" android.x86 = "res://x86/libgdexample.android.template_release.x86.so" android.x86_32 = "res://x86/libgdexample.android.template_release.x86.so" android.x86_64 = "res://libgdexample.android.template_release.x86_64.so" android.arm64-v8a = "res://libgdexample.android.template_release.arm64-v8a.so" android.arm64 = "res://libgdexample.android.template_release.arm64-v8a.so" ```
15fa826
to
dce2686
Compare
I've updated the fix to remove the Android specific abis from the feature list. |
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.
If it's not used for something Android specific, it seems fine to me.
Thanks! |
Cherry-picked for 4.1.4. |
The presence of those abis cause them to be included in the set of
p_features
passed to thegdextension_export_plugin#_export_file(...)
method, which caused them to be lumped in thefeatures_wo_arch
set.When trying to find the gdextension library path, we use a predicate with the following logic:
For a
gdextension
config file like the one below, this causes the first android entry (android.armeabi-v7a = ...
) to always be returned regardless of archs since it always satisfies the predicate.Fixes #82727