diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-07-26 00:01:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-26 00:01:06 +0200 |
commit | d483a85a0ff4462fe7bff5d5ff6ea69c66cab417 (patch) | |
tree | e71f3eea9551e56ffe49f74b4a48fba2debffc82 | |
parent | b6ab5b5e2bbdc6881f65c56a2c4ab39edbd6a87b (diff) | |
parent | 21297a533eb40b939aac1afb62cae2c1ddcb551a (diff) |
Merge pull request #30829 from santouits/shadow-local
fix getting correct mingw-w64 version
-rw-r--r-- | methods.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/methods.py b/methods.py index 7840fb1b64..86ab7cd9af 100644 --- a/methods.py +++ b/methods.py @@ -617,7 +617,11 @@ def detect_darwin_sdk_path(platform, env): raise def get_compiler_version(env): - version = decode_utf8(subprocess.check_output([env['CXX'], '--version']).strip()) + # Not using this method on clang because it returns 4.2.1 # https://reviews.llvm.org/D56803 + if using_gcc(env): + version = decode_utf8(subprocess.check_output([env['CXX'], '-dumpversion']).strip()) + else: + version = decode_utf8(subprocess.check_output([env['CXX'], '--version']).strip()) match = re.search('[0-9][0-9.]*', version) if match is not None: return match.group().split('.') |