-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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 #24030
Comments
Here's a quick suggestion borrowing from both Rust and Debian naming convention. This suggestion also target an easy parsing method which would avoid problem since all information are required. Feel free to give feedback and adjust anything that might need additional attention. Grouping charactersAll portions could be parsed easily by splitting them with a specific character:
Application
Target
1 [Edit]: Underscore (_) would conflict with parsing convention and, as mentioned by @bruvzg , Version
° {YYYY}.{MM}.{DD}.{Commit Shorthash} is suggested for cleaner sorting, daily builds and CI/CD [Example no.1] Official stable release (Windows x64)godot-runtime-default-release_amd64-windows-msvc_v.3.1.2-stable.exe [Example no.2] Custom editor build based on stable codebase for tests (FreeBSD ARM)godot-tools-default-debug_arm-freebsd-gnu_v.3.1.2-stable [Example no.3] Custom template build with mono support based on a test codebase for tests (Android smartphones)godot-runtime-mono-debug_arm-unknown-android_2020.01.06.e2a6cae-dev This said, I've got some question around this:
By hoping that we will find the best way to suffix all the information in one! 😄 |
Dots may cause some problems with some not very smart file managers (like macOS Finder). |
Currently multiple
i585 is first Pentium (released in 1993), i686 is Pentium Pro (released in 1995), more info: https://gcc.gnu.org/onlinedocs/gcc-4.8.2/gcc/i386-and-x86-64-Options.html
That's the same thing, Windows uses AMD64 name, everything else uses x86_64 |
Thanks for the info @bruvzg According to your information and as trying to find a good cross-platform/language in-between suffix based on the current form mentioned above and the convention used by others for a maximum flexibility and details, let me know if the following compromises would be fair as the new naming convention: So there would be no issues of using only I understand that dots should not be used in the tuples/target triples and to some other places. Anyhow, dots are already used for the current form mentioned above in the filenames, should we stop using this? I see the point with |
It seems that x11 is being replaced with "linux" there, so it would be trivial to use |
I think it would be nice to get the final name on demand based on passed command-line arguments. See how it's currently hard-coded for running simple tests on server platform: Lines 140 to 145 in 5efd436
|
I still prefer dots over hyphen/underscore. Might be my personal preference(or might be used to seeing it) or there may be others who like it that way. |
Too old and low-quality. Closing... :P |
Duh :P I'll have to remember to open a GIP about this as it would be good to change for 4.0. |
Suggestion: have |
Godot version:
Master branch (3a93499)
OS/device including version:
All
Issue description:
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))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
)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.Related issues:
libtheora
compiling errors for ARM (Hard Float) #23506:libtheora
compiling errors for ARM (Hard Float)env["arch"]
instead ofplatform.machine()
in scons build scripts #23575: Useenv["arch"]
instead ofplatform.machine()
in scons build scriptsThe text was updated successfully, but these errors were encountered: