Rollup merge of #72111 - petrochenkov:docstrip, r=ehuss

rustc-book: Document `-Z strip=val` option

cc https://github.com/rust-lang/rust/issues/72110
This commit is contained in:
Ralf Jung 2020-05-21 13:12:15 +02:00 committed by GitHub
commit e2c05d1e9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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