diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-02-26 07:46:44 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-02-26 09:06:39 +0100 |
commit | dd4eb5494f7a9a2bd6a29b430a6741da49c51b03 (patch) | |
tree | 9e863c859ffbdd4bd9176c9cf0c0833ec8fd7a44 /methods.py | |
parent | 2d980f6f13cc761c1eb9329e7eaeba5e9d1a9b37 (diff) |
SCons: Re-allow upcoming GCC 8.4, fixes C++17 copy elision
Follow-up to #36484.
The patches for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86521 have now
landed in the `releases/gcc-8` branch and will be in GCC 8.4.
Diffstat (limited to 'methods.py')
-rw-r--r-- | methods.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/methods.py b/methods.py index 5fdcc2c4b4..2e858e3865 100644 --- a/methods.py +++ b/methods.py @@ -557,6 +557,10 @@ def is_vanilla_clang(env): def get_compiler_version(env): + """ + Returns an array of version numbers as strings: [major, minor, patch]. + The return array should have at least two values (major, minor). + """ if using_gcc(env): version = decode_utf8(subprocess.check_output([env['CXX'], '-dumpversion']).strip()) elif using_clang(env): @@ -564,7 +568,7 @@ def get_compiler_version(env): 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) + match = re.search('[0-9]+\.[0-9.]*', version) if match is not None: return match.group().split('.') else: |