[flang-commits] [flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)
Andrzej WarzyĆski via flang-commits
flang-commits at lists.llvm.org
Fri Dec 1 09:29:44 PST 2023
banach-space wrote:
> @DavidTruby suggested only linking Fortran_main if the fortran source contains a program statement.
That would be ideal, but how is the driver meant to know that? ;-)
> One could build a mixed source project now by linking using clang and manually specifying to link the rest of the fortran runtime library. I don't think this is a good option (...)
Agreed.
> This can be built with gfortran
Where does GFortran take it's main from? IIRC, it uses a completely different mechanism.
@mjklemm any thoughts? I'm leaning towards reverting this for now - it's not obvious to me what the solution should be.
https://github.com/llvm/llvm-project/pull/73124
More information about the flang-commits
mailing list