[PATCH] D145389: [lld][flang] Add exceptions for Flang runtime libraries on MinGW.

Markus Mützel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 6 10:49:01 PST 2023


mmuetzel added a comment.

The command from the downstream example expands to the following for me:

  $ flang -### test-cdotu.f -otest-cdotu -lblas
  flang-new version 16.0.0
  Target: x86_64-w64-windows-gnu
  Thread model: posix
  InstalledDir: C:/msys64/clang64/bin
   "C:/msys64/clang64/bin/flang-new" "-fc1" "-triple" "x86_64-w64-windows-gnu" "-emit-obj" "-fcolor-diagnostics" "-mrelocation-model" "pic" "-pic-level" "2" "-target-cpu" "x86-64" "-o" "C:/msys64/tmp/test-cdotu-ec65a8.o" "-x" "f95-cpp-input" "test-cdotu.f"
   "C:/msys64/clang64/bin/ld.lld" "-m" "i386pep" "-Bdynamic" "-o" "test-cdotu.exe" "C:/msys64/clang64/lib/crt2.o" "C:/msys64/clang64/lib/crtbegin.o" "-LC:/msys64/clang64/x86_64-w64-mingw32/lib" "-LC:/msys64/clang64/x86_64-w64-mingw32/mingw/lib" "-LC:/msys64/clang64/lib" "-LC:/msys64/clang64/lib/clang/16/lib/windows" "C:/msys64/tmp/test-cdotu-ec65a8.o" "-lblas" "-lFortran_main" "-lFortranRuntime" "-lFortranDecimal" "-lmingw32" "C:/msys64/clang64/lib/clang/16/lib/windows/libclang_rt.builtins-x86_64.a" "-lunwind" "-lmoldname" "-lmingwex" "-lmsvcrt" "-ladvapi32" "-lshell32" "-luser32" "-lkernel32" "-lmingw32" "C:/msys64/clang64/lib/clang/16/lib/windows/libclang_rt.builtins-x86_64.a" "-lunwind" "-lmoldname" "-lmingwex" "-lmsvcrt" "-lkernel32" "C:/msys64/clang64/lib/crtend.o"

Different to the `libclang_rt.builtins-x86_64` archive, the Fortran library is linked via `-l` flags (not via the full path to the library).

Does it need to be treated differently?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145389



More information about the llvm-commits mailing list