toplev.c (emit_debug_global_declarations): Do not output debug info when doing slim...
authorJan Hubicka <hubicka@ucw.cz>
Sat, 16 May 2015 23:20:49 +0000 (23:20 +0000)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sat, 16 May 2015 23:20:49 +0000 (23:20 +0000)
* toplev.c (emit_debug_global_declarations): Do not output debug info
when doing slim LTO objects.

From-SVN: r223260

gcc/ChangeLog
gcc/toplev.c

index ee7f737e16df8b62f9c6f4ec63a82cf2b3208731..87d792d1214446b7a43ff17f89ec1081322261ca 100644 (file)
@@ -1,3 +1,8 @@
+2015-05-16  Jan HUbicka  <hubicka@ucw.cz>
+
+       * toplev.c (emit_debug_global_declarations): Do not output debug info
+       when doing slim LTO objects.
+
 2015-05-16  Jan HUbicka  <hubicka@ucw.cz>
 
        * ipa-utils.h (warn_types_mismatch, odr_or_derived_type_p,
index 3c1ba38d9c2f23574dd24202bcae7198f2274948..1a65b62c90b5e1cfdc03ce0250b3b86519ac0bbc 100644 (file)
@@ -570,6 +570,9 @@ emit_debug_global_declarations (tree *vec, int len)
   /* Avoid confusing the debug information machinery when there are errors.  */
   if (seen_error ())
     return;
+  /* No need for debug info in object files when producing slimLTO.  */
+  if (!in_lto_p && flag_lto && !flag_fat_lto_objects)
+    return;
 
   timevar_push (TV_SYMOUT);
   for (i = 0; i < len; i++)