[flang-commits] [flang] [clang] [flang][driver] Allow explicit specification of -lFortran_main (PR #78152)

Kelvin Li via flang-commits flang-commits at lists.llvm.org
Mon Jan 15 09:42:20 PST 2024


kkwli wrote:

> > How would `flang-new -fno-fortran-main t.f -lFortran_main` work?
> 
> Good question. This won't work with this patch but currently should work. I'll have to fix this.
> 
> Do you agree that `flang-new -lFortran_main` is something we want to make work?

In my opinion, we should hide 'libFortran_main' as much as possible since it is really an implementation detail. I can see that the proposed behavior will give users less surprise. I am slightly in favor of this behavior.

In a long run, I still think that we need to get rid of `Fortran_main`. Perhaps, for the minimal, we can rename it to remove `Fortran` in the name to make people think that it is not required (by the users) to do any linking for Fortran code.

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


More information about the flang-commits mailing list