mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Updated compiler version detection
This fixes multiple issues/inconsistencies around `get_compiler_version()`: * With no shell allocated, launching the compiler could fail even with proper paths being set. * The return value was described as "an array of version numbers as ints", but the function actually returned a `Dictionary` (or `None`). * Not all calls were properly handling a `None` return value in case of errors. On Windows this broke compiling for me since #81869 with default settings. * Some calls defined inconsistent defaults/fallbacks (`0` or `-1`).
This commit is contained in:
parent
fcbc50ec14
commit
426e18fd37
4 changed files with 31 additions and 21 deletions
|
@ -106,7 +106,7 @@ def configure(env: "Environment"):
|
|||
print("Using linker program: " + env["linker"])
|
||||
if env["linker"] == "mold" and using_gcc(env): # GCC < 12.1 doesn't support -fuse-ld=mold.
|
||||
cc_version = get_compiler_version(env)
|
||||
cc_semver = (int(cc_version["major"]), int(cc_version["minor"]))
|
||||
cc_semver = (cc_version["major"], cc_version["minor"])
|
||||
if cc_semver < (12, 1):
|
||||
found_wrapper = False
|
||||
for path in ["/usr/libexec", "/usr/local/libexec", "/usr/lib", "/usr/local/lib"]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue