summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-04-04 12:12:10 +0200
committerRémi Verschelde <rverschelde@gmail.com>2020-04-04 12:12:57 +0200
commit2e2ccb994b4c44535e2be1a14a741e6f14dd271e (patch)
tree9c0c4d8fdf41c9dfb5397471a607245cf5db8000
parent9abb415d92f93c19abc390e135d1b073ea44d09a (diff)
SCons: Expand CXX in check for vanilla Clang
I had missed it in df7ecfc4a7f8403144be2aa49bb47f9ead25926b it seems. Fixes #37575.
-rw-r--r--methods.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/methods.py b/methods.py
index 89a229e4ab..805ae256c3 100644
--- a/methods.py
+++ b/methods.py
@@ -598,7 +598,11 @@ def detect_darwin_sdk_path(platform, env):
def is_vanilla_clang(env):
if not using_clang(env):
return False
- version = subprocess.check_output([env["CXX"], "--version"]).strip().decode("utf-8")
+ try:
+ version = subprocess.check_output([env.subst(env["CXX"]), "--version"]).strip().decode("utf-8")
+ except (subprocess.CalledProcessError, OSError):
+ print("Couldn't parse CXX environment variable to infer compiler version.")
+ return False
return not version.startswith("Apple")