Merge pull request #106216 from shiena/fix/windows-path

Buildsystem: Convert path separators for Windows
This commit is contained in:
Thaddeus Crews 2025-06-18 18:14:04 -05:00
commit e18acc7ecb
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC

View file

@ -665,7 +665,11 @@ def is_apple_clang(env):
if not using_clang(env):
return False
try:
version = subprocess.check_output(shlex.split(env.subst(env["CXX"])) + ["--version"]).strip().decode("utf-8")
version = (
subprocess.check_output(shlex.split(env.subst(env["CXX"]), posix=False) + ["--version"])
.strip()
.decode("utf-8")
)
except (subprocess.CalledProcessError, OSError):
print_warning("Couldn't parse CXX environment variable to infer compiler version.")
return False
@ -737,7 +741,7 @@ def get_compiler_version(env):
# Clang used to return hardcoded 4.2.1: # https://reviews.llvm.org/D56803
try:
version = subprocess.check_output(
shlex.split(env.subst(env["CXX"])) + ["--version"], shell=(os.name == "nt"), encoding="utf-8"
shlex.split(env.subst(env["CXX"]), posix=False) + ["--version"], shell=(os.name == "nt"), encoding="utf-8"
).strip()
except (subprocess.CalledProcessError, OSError):
print_warning("Couldn't parse CXX environment variable to infer compiler version.")