lto/114655 - -flto=4 at link time doesn't override -flto=auto at compile time
commit32fb04adae90a0ea68e64e8fc3cb04b613b2e9f3
authorRichard Biener <rguenther@suse.de>
Tue, 9 Apr 2024 12:25:57 +0000 (9 14:25 +0200)
committerRichard Biener <rguenther@suse.de>
Tue, 9 Apr 2024 13:29:53 +0000 (9 15:29 +0200)
treec92f195b4002c52d97772acb8f82b8e6bb8721c3
parentce3c743d8cfbadc0aaa80267bc002fd05267ffac
lto/114655 - -flto=4 at link time doesn't override -flto=auto at compile time

The following adjusts -flto option processing in lto-wrapper to have
link-time -flto override any compile time setting.

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.
gcc/lto-wrapper.cc