[macOS, 3.x] Workaround Xcode 15 linker bug.

This commit is contained in:
bruvzg 2023-09-20 23:18:32 +03:00
parent 1d7a417aff
commit fad3fced8f
No known key found for this signature in database
GPG key ID: 7960FCF39844EC38
2 changed files with 19 additions and 1 deletions

View file

@ -1080,6 +1080,17 @@ def get_compiler_version(env):
return None
def is_vanilla_clang(env):
if not using_clang(env):
return False
try:
version = decode_utf8(subprocess.check_output([env.subst(env["CXX"]), "--version"]).strip())
except (subprocess.CalledProcessError, OSError):
print("Couldn't parse CXX environment variable to infer compiler version.")
return False
return not version.startswith("Apple")
def using_gcc(env):
return "gcc" in os.path.basename(env["CC"])