Skip to content

Commit 3896f07

Browse files
Note impact of -Cstrip on backtraces
It is not always clear to people what the impact of `-Cstrip` options are. They are a common question on sites like StackOverflow, and sometimes people even report bugs with "no backtrace" after deliberately mangling the symbol table. We cannot exhaustively document every permutation, but we should warn people about common effects.
1 parent a7e3b1c commit 3896f07

File tree

1 file changed

+5
-2
lines changed
  • src/doc/rustc/src/codegen-options

1 file changed

+5
-2
lines changed

Diff for: src/doc/rustc/src/codegen-options/index.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -553,9 +553,12 @@ Supported values for this option are:
553553
of MSVC).
554554
- `debuginfo` - debuginfo sections and debuginfo symbols from the symbol table
555555
section are stripped at link time and are not copied to the produced binary
556-
or separate files.
556+
or separate files. This should leave backtraces mostly-intact but may make
557+
using a debugger like gdb or lldb ineffectual.
557558
- `symbols` - same as `debuginfo`, but the rest of the symbol table section is
558-
stripped as well if the linker supports it.
559+
stripped as well if the linker supports it. On platforms which depend on the
560+
binary's symbol table for backtraces, this can affect them so negatively as to
561+
make the trace completely incomprehensible.
559562

560563
## symbol-mangling-version
561564

0 commit comments

Comments
 (0)