ignore -flto= options recognized by GCC
authorSylvestre Ledru <sylvestre@debian.org>
Mon, 5 Apr 2021 09:54:17 +0000 (11:54 +0200)
committerSylvestre Ledru <sylvestre@debian.org>
Mon, 5 Apr 2021 09:54:17 +0000 (11:54 +0200)
commit1628486548420f85b3467026d54663d1516404f5
tree832e07d2f86336d8707f7e06cfb2c70a62277c22
parent67133ee1d280230091d85a839d9a9f6665b6265f
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=<auto|jobserver|<N> to select the parallelity for LTO builds. LLVM also has -flto-jobs=<N>, 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=<n> could also be translated to -flto-jobs=<N>.

Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D99501
clang/include/clang/Driver/Options.td