Re: [PATCH] lto: fix error handling for -Wl,-plugin-opt=debug

2022-02-02 Thread Richard Biener via Gcc-patches
On Wed, Feb 2, 2022 at 3:48 PM Martin Liška wrote: > > On 2/2/22 15:38, Richard Biener wrote: > > ... checking for seen_error () unnecessary. > > Sure, so something like this? yes, I think so. > Ready to be installed? OK. > Thanks, > Martin

Re: [PATCH] lto: fix error handling for -Wl,-plugin-opt=debug

2022-02-02 Thread Martin Liška
] lto: fix error handling for -Wl,-plugin-opt=debug When one uses something like: -Wl,-plugin-opt=debug, we end up with lto1 WPA invocation that has 'debug' on command line. We interpret that as input filename. The patch moves resolution checking later so that we end up with a reason

Re: [PATCH] lto: fix error handling for -Wl,-plugin-opt=debug

2022-02-02 Thread Richard Biener via Gcc-patches
On Wed, Feb 2, 2022 at 3:31 PM Martin Liška wrote: > > When one uses something like: -Wl,-plugin-opt=debug, > we end up with lto1 WPA invocation that has 'debug' > on command line. We interpret that as input filename. > > The patch moves resolution checking later so that we end up with > a reasona

[PATCH] lto: fix error handling for -Wl,-plugin-opt=debug

2022-02-02 Thread Martin Liška
When one uses something like: -Wl,-plugin-opt=debug, we end up with lto1 WPA invocation that has 'debug' on command line. We interpret that as input filename. The patch moves resolution checking later so that we end up with a reasonable error message: lto1: error: open debug failed: No such file