[all-commits] [llvm/llvm-project] f59cd8: [clang] [MinGW] Fix gcc version detection/picking

Martin Storsjö via All-commits all-commits at lists.llvm.org
Fri May 28 01:44:53 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f59cd8a4a606643e7248cecc239e0d229feb3320
      https://github.com/llvm/llvm-project/commit/f59cd8a4a606643e7248cecc239e0d229feb3320
  Author: Martin Storsjö <martin at martin.st>
  Date:   2021-05-28 (Fri, 28 May 2021)

  Changed paths:
    M clang/lib/Driver/ToolChains/MinGW.cpp
    A clang/test/Driver/Inputs/mingw_ubuntu_posix_tree/usr/lib/gcc/x86_64-w64-mingw32/10.2-posix/include-fixed/.keep
    A clang/test/Driver/Inputs/mingw_ubuntu_posix_tree/usr/lib/gcc/x86_64-w64-mingw32/10.2-posix/include/c++/backward/.keep
    A clang/test/Driver/Inputs/mingw_ubuntu_posix_tree/usr/lib/gcc/x86_64-w64-mingw32/10.2-posix/include/c++/x86_64-w64-mingw32/.keep
    M clang/test/Driver/mingw-sysroot.cpp
    M clang/test/Driver/mingw.cpp

  Log Message:
  -----------
  [clang] [MinGW] Fix gcc version detection/picking

Actually compare each version to the version of the last chosen one.

There's no guarantee that the added test case does showcase the
previous issue (it depends on the order that directory entries
are returned when iterating), but with the issue fixed it should behave
deterministically in any case.

Also improve the match patterns in the mingw-sysroot.cpp test a bit.

Differential Revision: https://reviews.llvm.org/D102873




More information about the All-commits mailing list