From 1899afa685a9b43cccff0869c2b210bd397306a6 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Mon, 11 May 2020 18:13:51 +0300 Subject: [PATCH] rustc-book: Document `-Z strip=val` option --- .../unstable-book/src/compiler-flags/strip.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/doc/unstable-book/src/compiler-flags/strip.md diff --git a/src/doc/unstable-book/src/compiler-flags/strip.md b/src/doc/unstable-book/src/compiler-flags/strip.md new file mode 100644 index 0000000000000..52cb98113c0c1 --- /dev/null +++ b/src/doc/unstable-book/src/compiler-flags/strip.md @@ -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.