[flang-commits] [flang] [clang] [flang][driver] deprecate manual usage of -lFortran_main (PR #79016)
Andrzej WarzyĆski via flang-commits
flang-commits at lists.llvm.org
Mon Jan 22 11:05:22 PST 2024
================
@@ -1193,6 +1193,16 @@ static void addFortranMain(const ToolChain &TC, const ArgList &Args,
return;
}
+ const Driver &D = TC.getDriver();
+ const char *LinkFlag = "-lFortran_main";
+
+ // warn if -lFortran_main was already specified
+ for (const char *arg : CmdArgs) {
+ if (strncmp(arg, LinkFlag, strlen(LinkFlag)) == 0)
+ D.Diag(diag::warn_drv_deprecated_custom)
+ << LinkFlag << "see the flang driver documentation for correct usage";
----------------
banach-space wrote:
[nit]
```suggestion
<< LinkFlag << "see the Flang driver documentation for correct usage";
```
https://github.com/llvm/llvm-project/pull/79016
More information about the flang-commits
mailing list