1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Buildsystem: Refactor compiler detection code

* Delete old check for gcc 8 as we support 9 or higher
* Flatten branches for clang and apple clang
* Renamed is_vanilla_clang to is_apple_clang to be more clear

Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
This commit is contained in:
Yevhen Babiichuk (DustDFG)
2024-11-14 09:48:34 +02:00
parent 673f396677
commit d55ed0cb15
3 changed files with 21 additions and 28 deletions

View File

@@ -652,7 +652,9 @@ def detect_darwin_sdk_path(platform, env):
raise
def is_vanilla_clang(env):
def is_apple_clang(env):
if env["platform"] not in ["macos", "ios"]:
return False
if not using_clang(env):
return False
try:
@@ -660,7 +662,7 @@ def is_vanilla_clang(env):
except (subprocess.CalledProcessError, OSError):
print_warning("Couldn't parse CXX environment variable to infer compiler version.")
return False
return not version.startswith("Apple")
return version.startswith("Apple")
def get_compiler_version(env):