> The following adjusts -flto option processing in lto-wrapper to have > link-time -flto override any compile time setting. > > LTO-boostrapped on x86_64-unknown-linux-gnu, testing in progress. > > OK for trunk and branches? GCC 11 seems to be unaffected by this. > > Thanks, > Richard. > > PR lto/114655 > * lto-wrapper.cc (merge_flto_options): Add force argument. > (merge_and_complain): Do not force here. > (run_gcc): But here to make the link-time -flto option override > any compile-time one. Looks good to me. I am actually surprised we propagate -flto settings from compile time at all. I guess I never tried it since I never assumed it to work :)
Honza