[all-commits] [llvm/llvm-project] ee0a3b: [MinGW] Implicitly add .exe suffix if not provided

Martin Storsjö via All-commits all-commits at lists.llvm.org
Tue Dec 17 00:09:35 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ee0a3b5c776cac769ae68dce369728eaae286671
      https://github.com/llvm/llvm-project/commit/ee0a3b5c776cac769ae68dce369728eaae286671
  Author: Martin Storsjö <martin at martin.st>
  Date:   2019-12-17 (Tue, 17 Dec 2019)

  Changed paths:
    M clang/lib/Driver/ToolChains/MinGW.cpp
    A clang/test/Driver/mingw-implicit-extension-cross.c
    A clang/test/Driver/mingw-implicit-extension-windows.c

  Log Message:
  -----------
  [MinGW] Implicitly add .exe suffix if not provided

GCC implicitly adds an .exe suffix if it is given an output file name,
but the file name doesn't contain a suffix, and there are certain
users of GCC that rely on this behaviour (and run into issues when
trying to use Clang instead of GCC). And MSVC's cl.exe also does the
same (but not link.exe).

However, GCC only does this when actually running on windows, not when
operating as a cross compiler.

As GCC doesn't have this behaviour when cross compiling, we definitely
shouldn't introduce the behaviour in such cases (as it would break
at least as many cases as this fixes).

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


  Commit: d39510ec1cda7c7808c1ecadb1364382f92c1af3
      https://github.com/llvm/llvm-project/commit/d39510ec1cda7c7808c1ecadb1364382f92c1af3
  Author: Martin Storsjö <martin at martin.st>
  Date:   2019-12-17 (Tue, 17 Dec 2019)

  Changed paths:
    M llvm/utils/lit/lit/util.py

  Log Message:
  -----------
  [lit] [windows] Make sure to convert all path separators to backslashes in NT style \\?\... paths

E.g. the mingw python distributed in msys2 (the mingw one, which is a
normal win32 application and doesn't use the msys2 runtime itself),
despite being a normal win32 python, still uses forward slashes. This
works fine for other cases (many, but not all), but when constructing a
raw NT path, all path separators must be backslashes.

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


Compare: https://github.com/llvm/llvm-project/compare/891a8655ab56...d39510ec1cda


More information about the All-commits mailing list