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?

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)

Reply via email to