-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Refactor build object suffix to standardized tuples/target triples identifying build options #1416
Comments
Pretty please, lets add You have to recompile the entire engine each time the more diversity we add to the resulting suffix name. Having no suffix could improve compilation times if you do have to change the configuration often, without producing a different binary for each. Again, this would only promote faster development iterations. |
For compile options for Godot, I don't think it's worth keeping For in-Godot uses, it would be nice if the OS feature flags for |
Proposal #3371 covers how the |
Also I would suggest not using |
Credits to @akien-mga in godotengine/godot#24030 for the original issue text. I reopened it as a proposal so it gets more visibility here.
Describe the project you are working on:
The Godot editor 🙂
Describe the problem or limitation you are having in your project:
We currently set a
suffix
string inSConstruct
that is appended to the name of all build objects, and most importantly the final Godot binary. It contains some information about the build options (platform, target, tools, ~arch/bitness, ~compiler), but not in a very consistent way for all platforms: most don't include compiler info, some have arch info, others have bitness info, the use of tools impact what kind of target info is included, etc.The current form is more or less:
(order might differ a bit towards the tail, didn't double check)
So we typically get binary names like these:
(Some other platforms don't follow this scheme and have instead:
and a resulting
bin/android_debug.apk
bundling the libs for all built arches.Their intermediate build options however follow the scheme:
albeit with some variation (see e.g.
.neon
here))Describe the feature / enhancement and how it helps to overcome the problem or limitation:
I propose to refactor this system to use well-documented and standardized tuples, so that you can see at a glance how a binary was configured. Such information could also be included in
godot --version
and printed to stdout on start, so that we get reliable info on users' build in bug reports.It would then also be easier for thirdparty buildsystems (e.g. GDNative plugins) to use compatible tuples, especially if we factor out this SCons logic in a Python module that could be reused outside Godot.
This should also be the opportunity to sanitize the mess we currently have with
arch
,android_arch
andbits
options. We should only usearch
and drop the rest IMO. (If we want to keepbits
for convenience, its mapping to "common-sense" arches -- e.g.arch=x86_64
forbits=64
on PC) for the given platform should likely be done in a module in a big switch, to avoid polluting each platform'sdetect.py
)Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
I don't have a proposal yet for how it should look like exactly, so feel free to do some research on what other projects do and make suggestions. Some data:
Information that should be included by our target tuple (won't be a triplet as we need more than 3 fields):
x11
,windows
,android
, etc.)opt
,opt.debug
,debug
)bits
,arch
andandroid_arch
based on the target platform)tools
or nothing)llvm
exists, but we should havegcc
,llvm
,msvc
, etc.)mono
, defined withenv.add_module_version_string
). We can't document every single build option this way though, so it should be limited to those which really matter for everyday use, like whether the build is linked againt the Mono SDK or notThe
extra_suffix
may not need to be included in the tuple and could just be appended at the end.If this enhancement will not be used often, can it be worked around with a few lines of script?:
No, as this is core build system functionality.
Is there a reason why this should be core and not an add-on in the asset library?:
This is core build system functionality.
The text was updated successfully, but these errors were encountered: