1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +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`).

(cherry picked from commit 426e18fd37)
This commit is contained in:
Mario Liebisch
2023-09-25 21:08:36 +02:00
committed by Yuri Sizov
parent 08bc3570ae
commit 5bb54d3184
4 changed files with 31 additions and 21 deletions

View File

@@ -203,7 +203,7 @@ def configure(env: "Environment"):
# Get version info for checks below.
cc_version = get_compiler_version(env)
cc_semver = (int(cc_version["major"]), int(cc_version["minor"]), int(cc_version["patch"]))
cc_semver = (cc_version["major"], cc_version["minor"], cc_version["patch"])
if env["lto"] != "none":
# Workaround https://github.com/emscripten-core/emscripten/issues/19781.