Merge pull request #90939 from AThousandShips/web_ver_fix

[Web] Fix building for web on Windows
This commit is contained in:
Rémi Verschelde 2024-04-22 12:53:36 +02:00
commit 69811b9209
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 5 additions and 1 deletions

View File

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