Fix compiler detection.

This commit is contained in:
bruvzg 2023-09-26 10:18:16 +03:00
parent 7e67b496ff
commit 89b568c2b0
1 changed files with 1 additions and 1 deletions

View File

@ -1021,7 +1021,7 @@ def get_compiler_version(env):
# Not using -dumpversion as some GCC distros only return major, and # Not using -dumpversion as some GCC distros only return major, and
# Clang used to return hardcoded 4.2.1: # https://reviews.llvm.org/D56803 # Clang used to return hardcoded 4.2.1: # https://reviews.llvm.org/D56803
try: try:
version = subprocess.check_output([env.subst(env["CXX"]), "--version"], shell=True).strip().decode("utf-8") version = subprocess.check_output([env.subst(env["CXX"]), "--version"]).strip().decode("utf-8")
except (subprocess.CalledProcessError, OSError): except (subprocess.CalledProcessError, OSError):
print("Couldn't parse CXX environment variable to infer compiler version.") print("Couldn't parse CXX environment variable to infer compiler version.")
return ret return ret