diff options
| author | Josh Triplett <josh@joshtriplett.org> | 2021-10-21 13:19:46 +0200 |
|---|---|---|
| committer | Josh Triplett <josh@joshtriplett.org> | 2021-11-15 10:21:02 +0100 |
| commit | e35b7bbdf8bf9939be5bcbaef781b95e8c93b6e1 (patch) | |
| tree | 7c8df211c6c273d8ca05ccff2904cc2e1e02241b /src/doc/rustc | |
| parent | c4884bbec7ae6ba06211a2769271b8db38c8284b (diff) | |
| download | rust-e35b7bbdf8bf9939be5bcbaef781b95e8c93b6e1.tar.gz rust-e35b7bbdf8bf9939be5bcbaef781b95e8c93b6e1.zip | |
Stabilize -Z strip as -C strip
Leave -Z strip available temporarily as an alias, to avoid breaking cargo until cargo transitions to using -C strip. (If the user passes both, the -C version wins.)
Diffstat (limited to 'src/doc/rustc')
| -rw-r--r-- | src/doc/rustc/src/codegen-options/index.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/doc/rustc/src/codegen-options/index.md b/src/doc/rustc/src/codegen-options/index.md index 4f8c4c66f88..0201b88417a 100644 --- a/src/doc/rustc/src/codegen-options/index.md +++ b/src/doc/rustc/src/codegen-options/index.md @@ -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. |
