================
@@ -182,6 +182,29 @@ void Flang::addCodegenOptions(const ArgList &Args,
CmdArgs.push_back("-fcoarray");
}
+void Flang::addLTOOptions(const ArgList &Args, ArgStringList &CmdArgs) const {
+ const ToolChain &TC = getToolChain();
+ const Driver &D = TC.getDriver();
+ DiagnosticsEngine &Diags = D.getDiags();
+ LTOKind LTOMode = D.getLTOMode();
+ // LTO mode is parsed by the Clang driver library.
+ assert(LTOMode != LTOK_Unknown && "Unknown LTO mode.");
+ if (LTOMode == LTOK_Full)
+ CmdArgs.push_back("-flto=full");
+ else if (LTOMode == LTOK_Thin) {
+ Diags.Report(
----------------
tarunprabhu wrote:
I know that this isn't part of this PR, but do you know what `flto=thin` does
in `flang`? Does it do anything at all or do we just accept this option, then
ignore it? This warning is not very informative, and I wonder if it is worth
providing something different.
https://github.com/llvm/llvm-project/pull/158125
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits