This is an archive of the discontinued LLVM Phabricator instance.

[flang] Fix linker test on Windows.

Authored by Meinersbur on Feb 22 2023, 2:08 PM.



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 in my case, it resolves to my 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.

Diff Detail

Event Timeline

Meinersbur created this revision.Feb 22 2023, 2:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 22 2023, 2:08 PM
Meinersbur requested review of this revision.Feb 22 2023, 2:08 PM
awarzynski accepted this revision.Feb 23 2023, 2:35 AM

LGTM, thanks!

This revision is now accepted and ready to land.Feb 23 2023, 2:35 AM
This revision was automatically updated to reflect the committed changes.