From: Sylvestre Ledru Date: Mon, 5 Apr 2021 09:54:17 +0000 (+0200) Subject: ignore -flto= options recognized by GCC X-Git-Tag: llvmorg-14-init~10469 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1628486548420f85b3467026d54663d1516404f5;p=platform%2Fupstream%2Fllvm.git ignore -flto= options recognized by GCC as requested in https://bugs.llvm.org/show_bug.cgi?id=49553, submitting the proposed changes to just ignore the -flto= options which are recognized by GCC ("auto" and "jobserver"). GCC supports -flto= to select the parallelity for LTO builds. LLVM also has -flto-jobs=, which only seems to have a meaning when used with -flto=thin? The attached patch just ignores the values "auto" and "jobserver". that doesn't change anything in functionality. Another option would be to map these values to either "thin" or "full", maybe in presence of the -ffat-lto-objects option? -flto= could also be translated to -flto-jobs=. Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D99501 --- diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index a6583ac..64d658b 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -4155,6 +4155,8 @@ defm reorder_blocks : BooleanFFlag<"reorder-blocks">, Group, Group; defm default_inline : BooleanFFlag<"default-inline">, Group; defm fat_lto_objects : BooleanFFlag<"fat-lto-objects">, Group; +def : Flag<["-"], "flto=auto">, Group; +def : Flag<["-"], "flto=jobserver">, Group; defm float_store : BooleanFFlag<"float-store">, Group; defm friend_injection : BooleanFFlag<"friend-injection">, Group; defm function_attribute_list : BooleanFFlag<"function-attribute-list">, Group;