Skip to content

Commit 1899afa

Browse files
committed
rustc-book: Document -Z strip=val option
1 parent 3fe4dd2 commit 1899afa

File tree

1 file changed

+17
-0
lines changed
  • src/doc/unstable-book/src/compiler-flags

1 file changed

+17
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# `strip`
2+
3+
The tracking issue for this feature is: [#72110](https://github.com/rust-lang/rust/issues/72110).
4+
5+
------------------------
6+
7+
Option `-Z strip=val` controls stripping of debuginfo and similar auxiliary data from binaries
8+
during linking.
9+
10+
Supported values for this option are:
11+
12+
- `none` - debuginfo and symbols (if they exist) are copied to the produced binary or separate files
13+
depending on the target (e.g. `.pdb` files in case of MSVC).
14+
- `debuginfo` - debuginfo sections and debuginfo symbols from the symbol table section
15+
are stripped at link time and are not copied to the produced binary or separate files.
16+
- `symbols` - same as `debuginfo`, but the rest of the symbol table section is stripped as well
17+
if the linker supports it.

0 commit comments

Comments
 (0)