aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorPaul Kirth <paulkirth@google.com>2024-01-23 14:04:52 -0800
committerGitHub <noreply@github.com>2024-01-23 14:04:52 -0800
commit9d476e1e1a18af390e3455a6622ee67a69c64103 (patch)
treef4dfc7844153746db48b935dd4123f1d64cf7bd4 /clang/lib/Frontend/CompilerInvocation.cpp
parenta829f109ffd518230df5191c64aa427603cf10d9 (diff)
downloadllvm-9d476e1e1a18af390e3455a6622ee67a69c64103.zip
llvm-9d476e1e1a18af390e3455a6622ee67a69c64103.tar.gz
llvm-9d476e1e1a18af390e3455a6622ee67a69c64103.tar.bz2
[clang][FatLTO] Avoid UnifiedLTO until it can support WPD/CFI (#79061)
Currently, the UnifiedLTO pipeline seems to have trouble with several LTO features, like SplitLTO units, which means we cannot use important optimizations like Whole Program Devirtualization or security hardening instrumentation like CFI. This patch reverts FatLTO to using distinct pipelines for Full LTO and ThinLTO. It still avoids module cloning, since that was error prone.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 7edea77..feb4de2 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -1861,20 +1861,6 @@ 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 (A->getOption().matches(options::OPT_ffat_lto_objects)) {
- if (Arg *Uni = Args.getLastArg(options::OPT_funified_lto,
- options::OPT_fno_unified_lto)) {
- if (Uni->getOption().matches(options::OPT_fno_unified_lto))
- Diags.Report(diag::err_drv_incompatible_options)
- << A->getAsString(Args) << "-fno-unified-lto";
- } else
- Diags.Report(diag::err_drv_argument_only_allowed_with)
- << A->getAsString(Args) << "-funified-lto";
- }
- }
-
if (Arg *A = Args.getLastArg(OPT_fthinlto_index_EQ)) {
if (IK.getLanguage() != Language::LLVM_IR)
Diags.Report(diag::err_drv_argument_only_allowed_with)