[flang-commits] [PATCH] D126291: [flang][Driver] Update link job on windows

Diana Picus via Phabricator via flang-commits flang-commits at lists.llvm.org
Tue May 31 05:08:45 PDT 2022


rovka added inline comments.


================
Comment at: flang/test/Driver/flang-linker-flags-windows.f90:16
+! Linker invocation to generate the executable
+! CHECK-LABEL:  lld-link.exe
+! CHECK-NOT: libcmt
----------------
Meinersbur wrote:
> This is failing for me. Instead of `lld-link.exe`, it is using `link.exe` (the Microsoft linker).
> 
> Without the `-###` flag, the link command is failing:
> ```
> flang-new version 15.0.0 (C:/Users/meinersbur/src/llvm-project/clang 09fdf5f6f5e70ecb7d95cdbb98442c998a55ce23)
> Target: x86_64-pc-windows-msvc
> Thread model: posix
> InstalledDir: c:\users\meinersbur\build\llvm-project\release\bin
>  "c:\\users\\meinersbur\\build\\llvm-project\\release\\bin\\flang-new" -fc1 -triple x86_64-pc-windows-msvc19.32.31329 -emit-obj -o "C:\\Users\\MEINER~1\\AppData\\Local\\Temp\\hello-ae4145.o" "C:\\Users\\meinersbur\\src\\llvm-project\\flang\\test\\Driver/Inputs/hello.f90"
>  "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.32.31326\\bin\\Hostx64\\x64\\link.exe" -out:a.exe "-libpath:c:\\users\\meinersbur\\build\\llvm-project\\release\\lib" Fortran_main.lib FortranRuntime.lib FortranDecimal.lib -nologo "C:\\Users\\MEINER~1\\AppData\\Local\\Temp\\hello-ae4145.o"
> LINK : fatal error LNK1561: entry point must be defined
> flang-new: error: linker command failed with exit code 1561 (use -v to see invocation)
> ```
This might be because you're not passing any subsystem. Can you try with `-Xlinker -subsystem:console`?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126291/new/

https://reviews.llvm.org/D126291



More information about the flang-commits mailing list