summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2023-10-26 10:55:53 +0300
committerGitHub <noreply@github.com>2023-10-26 10:55:53 +0300
commit05dcfa44c0f4c68c3a7b831d6ac2dd0572741ece (patch)
treee9745da314ab64adac9ac16167a601cdc18f61a1 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
parent18775a49416cf767b34eaaf925df5143e40582f4 (diff)
[clang] [Gnu] Improve GCCVersion parsing to match versions such as "10-win32" (#69079)
In earlier GCC versions, the Debian/Ubuntu provided mingw toolchains were packaged in /usr/lib/gcc/<triple> with version strings such as "5.3-win32", which were matched and found since 6afcd64eb65fca233a7b173f88cffb2c2c9c114c. However in recent versions, they have stopped including the minor version number and only have version strings such as "10-win32" and "10-posix". Generalize the parsing code to tolerate the patch suffix to be present on a version number with only a major number. Refactor the string parsing code to highlight the overall structure of the parsing. This implementation should yield the same result as before, except for when there's only one segment and it has trailing, non-number contents. This allows Clang to find the GCC libraries and headers in Debian/Ubuntu provided MinGW cross compilers.
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions