From 64f237db0f4c05d80d0fb6d3fd8471014c035fad Mon Sep 17 00:00:00 2001 From: josetr <37419832+josetr@users.noreply.github.com> Date: Wed, 25 Nov 2020 01:59:04 +0000 Subject: [PATCH] Fix GCC version detection --- build/Helpers.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/build/Helpers.lua b/build/Helpers.lua index 568d9ec3..e8bcd1f1 100644 --- a/build/Helpers.lua +++ b/build/Helpers.lua @@ -184,11 +184,12 @@ function GccVersion() if out == nil then return default_gcc_version end - local version = string.match(out, "gcc version [0-9\\.]+") - if version == nil then - version = string.match(out, "clang version [0-9\\.]+") + local version = string.match(out, "gcc[ -][Vv]ersion [0-9\\.]+") + if version ~= nil then + return string.sub(version, 13) end - return string.sub(version, 13) + version = string.match(out, "clang[ -][Vv]ersion [0-9\\.]+") + return string.sub(version, 15) end function UseCxx11ABI()