Meinersbur wrote:

@DavidTruby So CMake adds `-lFortranRuntime -lFortranDecimal` itself? I did not 
expect that, usually the flang-new driver would be responsible for that. 

I found how CMake does it: 
https://github.com/Kitware/CMake/blob/ee2eadb252708b2401da99b8ccc69d6501c7143f/Modules/CMakeDetermineFortranCompiler.cmake#L246
There's even a workaround for Flang-RT on Windows forgetting that it has a 
dependency on `clang_rt.builtins.lib`.

I don't think we can rely on every build system doing that, so I would still 
advocate that `-stdlib=libc++` is not just ignored, but actually adds the C++ 
standard library linker flags (see 
https://github.com/llvm/llvm-project/pull/110598#issuecomment-2388005207) to 
support such language-combination scenarios using e.g. GNU Autotools (if 
feasible to do so without e.g. copy&pasting functions from the clang driver). 
Just ignoring it so an error goes away feels ... wrong.

https://github.com/llvm/llvm-project/pull/110598
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to