mmuetzel added a comment.

The error message I get without `-lc++`:

  ld.lld: error: undefined symbol: std::__1::mutex::lock()
  >>> referenced by 
libFortranRuntime.a(io-api.cpp.obj):(Fortran::runtime::io::IoStatementState* 
Fortran::runtime::io::BeginExternalListIO<(Fortran::runtime::io::Direction)0, 
Fortran::runtime::io::ExternalListIoStatementState>(int, char const*, int))
  >>> referenced by 
libFortranRuntime.a(io-api.cpp.obj):(Fortran::runtime::io::IoStatementState* 
Fortran::runtime::io::BeginExternalListIO<(Fortran::runtime::io::Direction)0, 
Fortran::runtime::io::ExternalListIoStatementState>(int, char const*, int))
  >>> referenced by 
libFortranRuntime.a(io-api.cpp.obj):(Fortran::runtime::io::IoStatementState* 
Fortran::runtime::io::BeginExternalListIO<(Fortran::runtime::io::Direction)1, 
Fortran::runtime::io::ExternalListIoStatementState>(int, char const*, int))
  >>> referenced 36 more times
  
  ld.lld: error: undefined symbol: std::__1::mutex::unlock()
  >>> referenced by 
libFortranRuntime.a(unit.cpp.obj):(Fortran::runtime::io::FlushOutputOnCrash(Fortran::runtime::Terminator
 const&))
  >>> referenced by 
libFortranRuntime.a(unit.cpp.obj):(Fortran::runtime::io::ExternalFileUnit::LookUp(int))
  >>> referenced by 
libFortranRuntime.a(unit.cpp.obj):(Fortran::runtime::io::ExternalFileUnit::GetUnitMap())
  >>> referenced 23 more times
  flang-new: error: linker command failed with exit code 1 (use -v to see 
invocation)



================
Comment at: clang/lib/Driver/ToolChains/MSVC.cpp:140
+    // defined in flang's runtime libraries.
+    if (TC.getTriple().isKnownWindowsMSVCEnvironment())
+      CmdArgs.push_back("/subsystem:console");
----------------
awarzynski wrote:
> mmuetzel wrote:
> > Is the MSVC toolchain used anywhere else but on Windows?
> No: 
> https://github.com/llvm/llvm-project/blob/5fee1799f4d8da59c251e2d04172fc2f387cbe54/llvm/include/llvm/ADT/Triple.h#L576-L578
>  ;-) 
In that case, this argument could probably be added unconditionally.


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

https://reviews.llvm.org/D126291

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to