]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Don't make -gsplit-dwarf imply -g
authorFangrui Song <maskray@google.com>
Wed, 13 May 2020 15:27:29 +0000 (08:27 -0700)
committerGiuliano Belinassi <giuliano.belinassi@usp.br>
Mon, 17 Aug 2020 16:20:04 +0000 (13:20 -0300)
-gsplit-dwarf introduces order dependency: it overrides previous -g0 and -g1.

Don't imply -g so that it can be plugged into a build without worrying
that unnecessary debugging information may be generated.

2020-05-13  Fangrui Song  <maskray@google.com>

PR debug/95096
* opts.c (common_handle_option): Don't make -gsplit-dwarf imply -g.
* doc/invoke.texi (-gsplit-dwarf): Update documentation.

gcc/doc/invoke.texi
gcc/opts.c

index 7c3cc141c01822020294dec6e063482163331c3f..eaaf6d06b657857fa046b95dbe6a4e899f82b219 100644 (file)
@@ -9166,11 +9166,11 @@ except when selective scheduling is enabled.
 
 @item -gsplit-dwarf
 @opindex gsplit-dwarf
-Separate as much DWARF debugging information as possible into a
-separate output file with the extension @file{.dwo}.  This option allows
-the build system to avoid linking files with debug information.  To
-be useful, this option requires a debugger capable of reading @file{.dwo}
-files.
+If DWARF debugging information is enabled, separate as much debugging
+information as possible into a separate output file with the extension
+@file{.dwo}.  This option allows the build system to avoid linking files with
+debug information.  To be useful, this option requires a debugger capable of
+reading @file{.dwo} files.
 
 @item -gdescribe-dies
 @opindex gdescribe-dies
index 6628f7e8f1317e5dc6558078b432f795337703c3..68321cce81ebfbbc1429da6f003d20c969e07629 100644 (file)
@@ -2704,11 +2704,6 @@ common_handle_option (struct gcc_options *opts,
       set_debug_level (DWARF2_DEBUG, false, "", opts, opts_set, loc);
       break;
 
-    case OPT_gsplit_dwarf:
-      set_debug_level (NO_DEBUG, DEFAULT_GDB_EXTENSIONS, "", opts, opts_set,
-                      loc);
-      break;
-
     case OPT_ggdb:
       set_debug_level (NO_DEBUG, 2, arg, opts, opts_set, loc);
       break;