diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-04-04 13:39:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-04 13:39:35 +0200 |
commit | ea48b403a9e7b8ddb2b814c6ea413bb9f5ed0518 (patch) | |
tree | 828b1af751b9107ec38d27eb0066c56bd8755994 | |
parent | 0ba6308e52d76bb1bb6f0347f001d5a205028810 (diff) | |
parent | 2e2ccb994b4c44535e2be1a14a741e6f14dd271e (diff) |
Merge pull request #37576 from akien-mga/scons-fix-is_vanilla_clang
SCons: Expand CXX in check for vanilla Clang
-rw-r--r-- | methods.py | 6 |
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") |