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 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
