[flang-commits] [flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

David Truby via flang-commits flang-commits at lists.llvm.org
Mon Nov 27 10:13:43 PST 2023


DavidTruby wrote:

I think so yes. The issue is that Windows really wants these things to be in the object files rather than passed on the link line, which is what the patch you're referencing changed for linking the runtimes at least. Doing that for this as well is a little more complex though, so I suggest just passing the `/WHOLEARCHIVE` on the link line as the runtimes were also being passed before (you won't need to pass Fortran_main like it was before though, as the directive to link that is now in every object file).

https://github.com/llvm/llvm-project/pull/73124


More information about the flang-commits mailing list