Message ID | 20160115100258.GB77658@kam.mff.cuni.cz |
---|---|
State | New |
Headers | show |
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) > >
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)