[flang][test] Don't require .exe suffix.
authorMichael Kruse <llvm-project@meinersbur.de>
Mon, 8 Aug 2022 16:32:04 +0000 (11:32 -0500)
committerTobias Hieta <tobias@hieta.se>
Wed, 10 Aug 2022 15:43:37 +0000 (17:43 +0200)
commit4b27d95d1c7ea83e63668e8e841c5f77c8a2bb03
treeb1e98ac0510752b8c6a77da9e6008f739998913f
parent10df85da672f698ad573af5e344e27d4effd6c20
[flang][test] Don't require .exe suffix.

The suffix is only added then the path the (lld-)link.exe is fully
resolved. Otherwise it may stay "link" or "lld-link".

On non-Windows platforms, lld-link also exists as a symbolic link to
lld, such that the full the path to lld-link might also be resolved
without .exe suffix in this case.

Note that CLANG_DEFAULT_LINKER could be set to other linkers such as
mold, in which case the test may still fail. This also applies to the
non-Windows tests that require "ld" in the linker name.

Fixes issue #56955

(cherry picked from commit 8c0979c8f7723306862b33583c6bdb1f4566a969)
flang/test/Driver/linker-flags.f90