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

Kelvin Li via flang-commits flang-commits at lists.llvm.org
Wed Jan 17 08:03:47 PST 2024


kkwli wrote:

> > How would `flang-new -fno-fortran-main t.f -lFortran_main` work?
> 
> This works because I only remove `-lFortran_main` when it is going to be added implicitly. `-fno-fortran-main` ensures that we never reach this branch. I've added a test to verify this.

I don't know what is the right way to handle the case that users have conflicting flags specified. This behavior is to only remove the implicit `-lFortran_main` not the explicit one. However, in my opinion, the `-fno-fortran-main` is an explicit intent that the users do not want the `main` whether or not `-lFortran_main` is specified.

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


More information about the flang-commits mailing list