This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Do not produce debug info during LTO compile stage
- From: Richard Biener <rguenther at suse dot de>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 15 Jan 2016 11:15:21 +0100 (CET)
- Subject: Re: Do not produce debug info during LTO compile stage
- Authentication-results: sourceware.org; auth=none
- References: <20160115100258 dot GB77658 at kam dot mff dot cuni dot cz>
On Fri, 15 Jan 2016, Jan Hubicka wrote:
> Hi,
> during LTO compile stage we currently build early dwarf debug info just to throw
> it away. This wastes quite some compile time and memory.
>
> Bootstrapped/regtested x86_64-linux, OK?
Ok. (did you verify you get the same code / debug out of this? just
in case there are surprises wrt order of computing stuff like assember
names)
Thanks,
Richard.
> Honza
>
> * toplev.c (process_options): Do not produce debug info during
> LTO compile time.
> Index: toplev.c
> ===================================================================
> --- toplev.c (revision 232407)
> +++ toplev.c (working copy)
> @@ -1386,7 +1386,10 @@ process_options (void)
> if (debug_info_level == DINFO_LEVEL_NONE)
> write_symbols = NO_DEBUG;
>
> - if (write_symbols == NO_DEBUG)
> + if (write_symbols == NO_DEBUG
> + /* When in compile stage of LTO build we do not output debug info.
> + Do not waste memory by building it. */
> + || (flag_lto && !in_lto_p && !flag_fat_lto_objects))
> ;
> #if defined(DBX_DEBUGGING_INFO)
> else if (write_symbols == DBX_DEBUG)
>
>
--
Richard Biener <rguenther@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)