summaryrefslogtreecommitdiff
path: root/methods.py
diff options
context:
space:
mode:
Diffstat (limited to 'methods.py')
-rw-r--r--methods.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/methods.py b/methods.py
index f6c9e939c6..18e1c0bba7 100644
--- a/methods.py
+++ b/methods.py
@@ -550,11 +550,13 @@ def detect_darwin_sdk_path(platform, env):
raise
def get_compiler_version(env):
- # 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:
+ elif using_clang(env):
+ # Not using -dumpversion as it used to return 4.2.1: https://reviews.llvm.org/D56803
version = decode_utf8(subprocess.check_output([env['CXX'], '--version']).strip())
+ else: # TODO: Implement for MSVC
+ return None
match = re.search('[0-9][0-9.]*', version)
if match is not None:
return match.group().split('.')