mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +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
|
@ -120,16 +120,9 @@ def configure(env: "Environment"):
|
|||
env.Append(CCFLAGS=["-arch", "x86_64", "-mmacosx-version-min=10.13"])
|
||||
env.Append(LINKFLAGS=["-arch", "x86_64", "-mmacosx-version-min=10.13"])
|
||||
|
||||
cc_version = get_compiler_version(env) or {
|
||||
"major": None,
|
||||
"minor": None,
|
||||
"patch": None,
|
||||
"metadata1": None,
|
||||
"metadata2": None,
|
||||
"date": None,
|
||||
}
|
||||
cc_version_major = int(cc_version["major"] or -1)
|
||||
cc_version_minor = int(cc_version["minor"] or -1)
|
||||
cc_version = get_compiler_version(env)
|
||||
cc_version_major = cc_version["major"]
|
||||
cc_version_minor = cc_version["minor"]
|
||||
vanilla = is_vanilla_clang(env)
|
||||
|
||||
# Workaround for Xcode 15 linker bug.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue