]> git.lizzy.rs Git - rust.git/blobdiff - src/doc/rustc/src/codegen-options/index.md
Merge commit '23d11428de3e973b34a5090a78d62887f821c90e' into clippyup
[rust.git] / src / doc / rustc / src / codegen-options / index.md
index 4f8c4c66f889122f21f9d49f0cf6de7a5adff8c7..0201b88417a8b8f2ef4a3c0cfcf4435c36a77472 100644 (file)
@@ -525,6 +525,22 @@ platforms. Possible values are:
 Note that `packed` and `unpacked` are gated behind `-Z unstable-options` on
 non-macOS platforms at this time.
 
+## strip
+
+The option `-C 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.
+
 ## target-cpu
 
 This instructs `rustc` to generate code specifically for a particular processor.