summaryrefslogtreecommitdiff
path: root/methods.py
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-02-23 21:34:45 +0100
committerGitHub <noreply@github.com>2020-02-23 21:34:45 +0100
commitc3dc5fe12f1375bcc63270dbe02f2f256072d3b4 (patch)
treece4c04601edc36291e16f0dc7b6dd12dfcad67ac /methods.py
parenta920f9727a29c854dcc7f193f691f02aad15d94d (diff)
parent214d852ffd864b75564643b49b2c960d469be3ed (diff)
Merge pull request #36484 from akien-mga/scons-compiler-version-check
SCons: Add GCC/Clang minimum version check
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('.')