Triggering -save-temps from the front-end code
Richard Biener
richard.guenther@gmail.com
Mon Nov 28 11:44:04 GMT 2022
On Mon, Nov 28, 2022 at 12:30 PM Florian Weimer via Gcc <gcc@gcc.gnu.org> wrote:
>
> I've got some instrumentation for logging errors to a magic directory,
> so that I can see if a build triggered them even when it did not
> fail—and hid all compiler errors and warnings.
>
> Unfortunately, some build systems immediately delete the input source
> files. Is there some easy way I can dump the pre-processed and
> non-preprocessed sources to my log file? I tried to understand how
> -save-temps for crash recovery works, but it seems that this runs
> outside of the frontend, in the driver.
Yep, there's no way to trigger -save-temps behavior after-the-fact.
> Here's an example of the
> challenges this would help to solve:
>
> Building in strict C99 mode
> <https://github.com/ksh93/ksh/issues/587>
>
> Thanks,
> Florian
>
More information about the Gcc
mailing list