use the new version of lto auto ignore patch

This commit is contained in:
Sylvestre Ledru 2021-04-05 12:00:54 +02:00
parent 6849d787c4
commit 084ecd86b1

View File

@ -1,31 +1,13 @@
Index: llvm-toolchain-12-12.0.0~++rc3/clang/include/clang/Driver/Driver.h
===================================================================
--- llvm-toolchain-12-12.0.0~++rc3.orig/clang/include/clang/Driver/Driver.h
+++ llvm-toolchain-12-12.0.0~++rc3/clang/include/clang/Driver/Driver.h
@@ -51,7 +51,8 @@ enum LTOKind {
LTOK_None,
LTOK_Full,
LTOK_Thin,
- LTOK_Unknown
+ LTOK_Unknown,
+ LTOK_Ignored
};
/// Driver - Encapsulate logic for constructing compilation processes
Index: llvm-toolchain-12-12.0.0~++rc3/clang/lib/Driver/Driver.cpp
===================================================================
--- llvm-toolchain-12-12.0.0~++rc3.orig/clang/lib/Driver/Driver.cpp
+++ llvm-toolchain-12-12.0.0~++rc3/clang/lib/Driver/Driver.cpp
@@ -608,9 +608,12 @@ void Driver::setLTOMode(const llvm::opt:
LTOMode = llvm::StringSwitch<LTOKind>(LTOName)
.Case("full", LTOK_Full)
.Case("thin", LTOK_Thin)
+ .Case("auto", LTOK_Ignored)
+ .Case("jobserver", LTOK_Ignored)
.Default(LTOK_Unknown);
if (LTOMode == LTOK_Unknown) {
+ // FIXME: check if argument is a number, then ignore, or handle it
assert(A);
Diag(diag::err_drv_unsupported_option_argument) << A->getOption().getName()
<< A->getValue();
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -4155,6 +4155,8 @@
defm branch_count_reg : BooleanFFlag<"branch-count-reg">, Group<clang_ignored_gcc_optimization_f_Group>;
defm default_inline : BooleanFFlag<"default-inline">, Group<clang_ignored_gcc_optimization_f_Group>;
defm fat_lto_objects : BooleanFFlag<"fat-lto-objects">, Group<clang_ignored_gcc_optimization_f_Group>;
+def : Flag<["-"], "flto=auto">, Group<clang_ignored_gcc_optimization_f_Group>;
+def : Flag<["-"], "flto=jobserver">, Group<clang_ignored_gcc_optimization_f_Group>;
defm float_store : BooleanFFlag<"float-store">, Group<clang_ignored_gcc_optimization_f_Group>;
defm friend_injection : BooleanFFlag<"friend-injection">, Group<clang_ignored_f_Group>;
defm function_attribute_list : BooleanFFlag<"function-attribute-list">, Group<clang_ignored_f_Group>;