[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 06:47:34 PDT 2022


mmuetzel added a comment.

Thank you for the suggestions. In the meantime, I added `-DLLVM_ENABLE_PROJECTS="clang;compiler-rt;mlir;flang;llvm" -DCOMPILER_RT_USE_BUILTINS_LIBRARY=ON` to the compiler flags which seems to have advanced a bit further.
Now, I get the following when trying to compile a simple "Hello World":

  $ PATH=./pkg/bin:$PATH flang-new hello.f90 -L/clang64/lib -v
  flang-new version 15.0.0
  Target: x86_64-w64-windows-gnu
  Thread model: posix
  InstalledDir: D:/llvm-project/pkg/bin
   "D:/llvm-project/pkg/bin/flang-new" -fc1 -triple x86_64-w64-windows-gnu -emit-obj -o C:/msys64/tmp/hello-076f00.o hello.f90
   "C:/msys64/clang64/bin/ld.lld.exe" -m i386pep -Bdynamic -o a.exe crt2.o crtbegin.o -LC:/msys64/clang64/lib -LD:/llvm-project/pkg/x86_64-w64-mingw32/lib -LD:/llvm-project/pkg/lib -LD:/llvm-project/pkg/x86_64-w64-mingw32/sys-root/mingw/lib -LD:/llvm-project/pkg/lib/clang/15.0.0/lib/windows C:/msys64/tmp/hello-076f00.o -lmingw32 D:/llvm-project/pkg/lib/clang/15.0.0/lib/windows/libclang_rt.builtins-x86_64.a -lunwind -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 D:/llvm-project/pkg/lib/clang/15.0.0/lib/windows/libclang_rt.builtins-x86_64.a -lunwind -lmoldname -lmingwex -lmsvcrt -lkernel32 crtend.o
  ld.lld: error: undefined symbol: _FortranAioBeginExternalListOutput
  >>> referenced by D:/llvm-project/./hello.f90:2
  >>>               C:/msys64/tmp/hello-6d9e30.o:(_QQmain)
  
  ld.lld: error: undefined symbol: _FortranAioOutputAscii
  >>> referenced by D:/llvm-project/./hello.f90:2
  >>>               C:/msys64/tmp/hello-6d9e30.o:(_QQmain)
  
  ld.lld: error: undefined symbol: _FortranAioEndIoStatement
  >>> referenced by D:/llvm-project/./hello.f90:2
  >>>               C:/msys64/tmp/hello-6d9e30.o:(_QQmain)
  
  ld.lld: error: undefined symbol: WinMain
  >>> referenced by C:/M/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crt0_c.c:18
  >>>               libmingw32.a(lib64_libmingw32_a-crt0_c.o):(main)
  flang-new: error: linker command failed with exit code 1 (use -v to see invocation)

Is this still a configuration error?


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

https://reviews.llvm.org/D126291



More information about the cfe-commits mailing list