This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: RFC: [PATCH] Support -plugin-opt=disable-output for LLVM plugin
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Rafael EspÃndola <rafael dot espindola at gmail dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Wed, 11 Feb 2015 19:14:35 -0800
- Subject: Re: RFC: [PATCH] Support -plugin-opt=disable-output for LLVM plugin
- Authentication-results: sourceware.org; auth=none
- References: <20150211234140 dot GA18695 at intel dot com> <CAG3jReLoiE+scugTZXeJXeFVJpHuAOjErYcXCG5t55u5Q89A9g at mail dot gmail dot com> <CAMe9rOoX1FPMuOQXu+1xB_iyehGzaVxXG7siutHX-bCsvyEszA at mail dot gmail dot com> <CAG3jReLmhv20pTPqrkbggdxKYB11AaqVRoCsW_DXb4Tb6hW36w at mail dot gmail dot com> <CAMe9rOq0Gg5U94gPDvEv6VigQQTaouSHXQ_LtT-Y5AB8PB4iHQ at mail dot gmail dot com> <CAG3jReL+rMcxc5zdx4Z63f3enPSNPb8nxnK5cq7G1OX33nfh+Q at mail dot gmail dot com> <CAMe9rOpiUsigDEmxtXNq0vC-_BGcBdSHVWsONHKPsKoL9r-4QA at mail dot gmail dot com>
On Wed, Feb 11, 2015 at 6:48 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Wed, Feb 11, 2015 at 6:42 PM, Rafael EspÃndola
> <rafael.espindola@gmail.com> wrote:
>>> You can use atexit. It is used elsewhere in llvm.
>>
>> The plugin needs an early exit, not a way to schedule stuff to run at exit.
>
> If that is the case, my patch is the way to go.
>
You can do
if (disable output) {
atexit (cleanup);
exit (0);
}
--
H.J.