This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Do not produce debug info during LTO compile stage


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]