[PATCH] D126291: [flang][Driver] Update link job on windows
Markus Mützel via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 3 07:06:14 PDT 2022
mmuetzel added a comment.
In D126291#3555848 <https://reviews.llvm.org/D126291#3555848>, @awarzynski wrote:
> Nice!
>
> In D126291#3555835 <https://reviews.llvm.org/D126291#3555835>, @mmuetzel wrote:
>
>> Is this still a configuration error?
>
> No :) Clearly the following `if` block from `tools::addFortranRuntimeLibs` is not entered:
>
> if (TC.getTriple().isKnownWindowsMSVCEnvironment()) {
> CmdArgs.push_back("Fortran_main.lib");
> CmdArgs.push_back("FortranRuntime.lib");
> CmdArgs.push_back("FortranDecimal.lib");
> }
>
> The missing symbols reported by the linker are from thes Fortran runtime libraries listed above. These libs should be included in the linker invocation generated by `flang-new`. I'm assuming that this makes sense - given the definition of isKnownWindowsMSVCEnvironment <https://github.com/llvm/llvm-project/blob/5fee1799f4d8da59c251e2d04172fc2f387cbe54/llvm/include/llvm/ADT/Triple.h#L576-L578>. If you use isOSWindows <https://github.com/llvm/llvm-project/blob/5fee1799f4d8da59c251e2d04172fc2f387cbe54/llvm/include/llvm/ADT/Triple.h#L571-L573> instead then it should work, right?
These libraries are named like this in MinGW:
$ ls ./pkg/lib/*Fortran*
./pkg/lib/libFortran_main.a ./pkg/lib/libFortranDecimal.a ./pkg/lib/libFortranLower.a ./pkg/lib/libFortranRuntime.a
./pkg/lib/libFortranCommon.a ./pkg/lib/libFortranEvaluate.a ./pkg/lib/libFortranParser.a ./pkg/lib/libFortranSemantics.a
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126291/new/
https://reviews.llvm.org/D126291
More information about the cfe-commits
mailing list