Skip to content

Commit

Permalink
[Web] Fix building for web on Windows
Browse files Browse the repository at this point in the history
On Windows the command for emscripten are provided as `.bat` files,
which causes the compiler version check to fail without `shell=True`
  • Loading branch information
AThousandShips committed Apr 20, 2024
1 parent 4a01602 commit 173692d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 173692d

Please sign in to comment.