[all-commits] [llvm/llvm-project] b52cf4: [flang] Fix linker test on Windows.

Michael Kruse via All-commits all-commits at lists.llvm.org
Wed Mar 8 14:47:50 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b52cf4c41cd0f8c84e304c0e65efca85ccde30d7
      https://github.com/llvm/llvm-project/commit/b52cf4c41cd0f8c84e304c0e65efca85ccde30d7
  Author: Michael Kruse <llvm-project at meinersbur.de>
  Date:   2023-03-08 (Wed, 08 Mar 2023)

  Changed paths:
    M flang/test/Driver/linker-flags.f90

  Log Message:
  -----------
  [flang] Fix linker test on Windows.

The linker-flags.f90 test checks for the linker command line. The `-target` indicates cross-compiling, the toolchain executables themselves are still running on the native platform. If it is Windows, the driver will try to fully resolve the path to `ld` which may include an `.exe` suffix.

In my case, it resolves to the MinGW installation (`"C:\\tools\\msys64\\usr\\bin\\ld.exe"`) found in `PATH`. The GNU ld that comes with the MSYS2 distribution does not support `elf64lppc` or MacOS emulation modes (`acosx_version_min`), but the test also does not require executing the linker.

Reviewed By: awarzynski

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




More information about the All-commits mailing list