https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117667
Kamil Dudka <kdudka at redhat dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kdudka at redhat dot com See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=94976, | |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=102233, | |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=103602 --- Comment #4 from Kamil Dudka <kdudka at redhat dot com> --- You are right, one needs to use -Dc_link_args=... to pass the same flags to the linker. Unfortunately, then the linker ran for minutes and ate all the memory on a 32 GiB machine, which I am afraid is bug #102233 and bug #103602. So it is way better to use csgcca, which runs the gcc analyzer in a separate process for each compilation unit with LTO disabled: https://github.com/csutils/cscppc/commit/d8d49b4cc92e0109b2654e9034c85e169bdc0566