[clang] [llvm] [clang][llvm][fatlto] Avoid cloning modules in FatLTO (PR #72180)
Teresa Johnson via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 27 16:55:56 PST 2023
================
@@ -1861,6 +1861,13 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args,
if (Args.hasArg(OPT_funified_lto))
Opts.PrepareForThinLTO = true;
}
+ if (Arg *A = Args.getLastArg(options::OPT_ffat_lto_objects,
+ options::OPT_fno_fat_lto_objects)) {
+ if (!Args.hasArg(OPT_funified_lto))
+ Diags.Report(diag::err_drv_incompatible_options)
----------------
teresajohnson wrote:
It might be less confusing to users if this error message is only given upon an explicit -fno-unified-lto, and diag::err_drv_argument_only_allowed_with is used for the lack of -funified-lto.
Also can you add driver tests to check that we get the expected error(s) in the expected option combinations?
https://github.com/llvm/llvm-project/pull/72180
More information about the cfe-commits
mailing list