]> git.lizzy.rs Git - rust.git/blob - src/doc/unstable-book/src/compiler-flags/strip.md
Rollup merge of #85663 - fee1-dead:document-arc-from, r=m-ou-se
[rust.git] / src / doc / unstable-book / src / compiler-flags / strip.md
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.