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

Martin Storsjö via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri Jun 10 02:42:18 PDT 2022


mstorsjo added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/MinGW.cpp:224
+    tools::addFortranRuntimeLibs(TC, CmdArgs);
+  }
+
----------------
mmuetzel wrote:
> MinGW behaves similarly to GNU in many respects. The GNU toolchain file adds `CmdArgs.push_back("-lm");` here as well.
> I didn't need that for the simple "Hello World" program. But that didn't invoke any math functions...
> Do we need to add that flag here, too?
MinGW doesn't need a separate `-lm`. (A `libm.a` is provided for compatibility if the option is specified, but it's just a dummy empty library.)


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

https://reviews.llvm.org/D126291



More information about the flang-commits mailing list