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

Markus Mützel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 1 11:49:23 PDT 2022


mmuetzel added a comment.

Just wondering if those changes are correct for MinGW.



================
Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:753
+                                  llvm::opt::ArgStringList &CmdArgs) {
+  if (TC.getTriple().isOSWindows()) {
+    CmdArgs.push_back("Fortran_main.lib");
----------------
Are those correct for MinGW? Should this be checking for `TC.getTriple().isKnownWindowsMSVCEnvironment()` instead?


================
Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:774
   llvm::sys::path::append(DefaultLibPath, "lib");
-  CmdArgs.push_back(Args.MakeArgString("-L" + DefaultLibPath));
+  if (TC.getTriple().isOSWindows())
+    CmdArgs.push_back(Args.MakeArgString("-libpath:" + DefaultLibPath));
----------------
same


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

https://reviews.llvm.org/D126291



More information about the cfe-commits mailing list