https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117667
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic --- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> --- -fanalyzer handling could be added to lto-wrapper.cc:merge_and_complain which can then arrange for it to be passed to the link phase. You "only" need to decide what to do if some TUs had -fanalyzer but others had not ... -fanalyzer isn't Optimization and thus not recorded on a per-function basis (not is -fanalyzer likely able to handle some functions analyzed and some not). A user-friendly way might be to add -fanalyzer when all TUs had it set and diagnose (and ignore) -fanalyzer if not all had it set and also the linker command line doesn't have it set.