[flang-commits] [clang] [flang] [flang][driver] Add -fno-fortran-main (link time) option to remove Fortran_main from link line (PR #74139)

Andrzej WarzyƄski via flang-commits flang-commits at lists.llvm.org
Fri Dec 8 08:47:56 PST 2023


================
@@ -6345,6 +6345,10 @@ def J : JoinedOrSeparate<["-"], "J">,
   Group<gfortran_Group>,
   Alias<module_dir>;
 
+def no_fortran_main : Flag<["-"], "fno-fortran-main">,
+  Visibility<[FlangOption]>, Group<f_Group>,
+  HelpText<"Don't link in Fortran main">;
----------------
banach-space wrote:

[nit] For folks less familiar with the compiler internals, it would be a good to be a bit more specific, e.g:

```bash
Skip Fortran_main.a (provided by Flang) when linking
```

WDYT? This is also something worth documenting ;-)

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


More information about the flang-commits mailing list