-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.
@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
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;