Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[clang] [Gnu] Improve GCCVersion parsing to match versions such as "10-win32" #69079

Merged
merged 4 commits into from
Oct 26, 2023

Commits on Oct 25, 2023

  1. [clang] [Gnu] Improve GCCVersion parsing to match versions such as "1…

    …0-win32"
    
    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
    6afcd64. 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.
    mstorsjo committed Oct 25, 2023
    Configuration menu
    Copy the full SHA
    df2dba0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d9120a0 View commit details
    Browse the repository at this point in the history
  3. Remove else after return

    mstorsjo committed Oct 25, 2023
    Configuration menu
    Copy the full SHA
    c241550 View commit details
    Browse the repository at this point in the history
  4. Fix formatting

    mstorsjo committed Oct 25, 2023
    Configuration menu
    Copy the full SHA
    cfd6600 View commit details
    Browse the repository at this point in the history