about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2020-05-21 13:12:15 +0200
committerGitHub <noreply@github.com>2020-05-21 13:12:15 +0200
commite2c05d1e9cee5f01312ca787ca8afd4179251346 (patch)
treea034cfb0c10388bf25cbbbefeac53c37a93591bd /src
parent25028adf21dae59552d0a9d5eb9b832ffe673836 (diff)
parent1899afa685a9b43cccff0869c2b210bd397306a6 (diff)
downloadrust-e2c05d1e9cee5f01312ca787ca8afd4179251346.tar.gz
rust-e2c05d1e9cee5f01312ca787ca8afd4179251346.zip
Rollup merge of #72111 - petrochenkov:docstrip, r=ehuss
rustc-book: Document `-Z strip=val` option

cc https://github.com/rust-lang/rust/issues/72110
Diffstat (limited to 'src')
-rw-r--r--src/doc/unstable-book/src/compiler-flags/strip.md17
1 files changed, 17 insertions, 0 deletions
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 00000000000..52cb98113c0
--- /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.