[llvm-branch-commits] [flang] 4b27d95 - [flang][test] Don't require .exe suffix.

Tobias Hieta via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Aug 10 08:44:07 PDT 2022


Author: Michael Kruse
Date: 2022-08-10T17:43:37+02:00
New Revision: 4b27d95d1c7ea83e63668e8e841c5f77c8a2bb03

URL: https://github.com/llvm/llvm-project/commit/4b27d95d1c7ea83e63668e8e841c5f77c8a2bb03
DIFF: https://github.com/llvm/llvm-project/commit/4b27d95d1c7ea83e63668e8e841c5f77c8a2bb03.diff

LOG: [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)

Added: 
    

Modified: 
    flang/test/Driver/linker-flags.f90

Removed: 
    


################################################################################
diff  --git a/flang/test/Driver/linker-flags.f90 b/flang/test/Driver/linker-flags.f90
index ae0f5b3c8f825..90c4a940c6d5f 100644
--- a/flang/test/Driver/linker-flags.f90
+++ b/flang/test/Driver/linker-flags.f90
@@ -36,8 +36,11 @@
 ! MINGW-SAME: -lFortranRuntime
 ! MINGW-SAME: -lFortranDecimal
 
-! NOTE: This check should also match if the default linker is lld-link.exe
-! MSVC-LABEL: link.exe
+! NOTE: This also matches lld-link (when CLANG_DEFAULT_LINKER=lld) and
+!       any .exe suffix that is added when resolving to the full path of
+!       (lld-)link.exe on Windows platforms. The suffix may not be added
+!       when the executable is not found or on non-Windows platforms.
+! MSVC-LABEL: link
 ! MSVC-SAME: Fortran_main.lib
 ! MSVC-SAME: FortranRuntime.lib
 ! MSVC-SAME: FortranDecimal.lib


        


More information about the llvm-branch-commits mailing list