Merge pull request #99217 from dustdfg/refactor_compiler_min_detection

Buildsystem: Refactor compiler detection code
This commit is contained in:
Thaddeus Crews 2024-11-15 10:42:42 -06:00
commit 6c9337de36
No known key found for this signature in database
GPG key ID: 62181B86FE9E5D84
3 changed files with 21 additions and 28 deletions

View file

@ -654,7 +654,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:
@ -662,7 +664,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):