diff options
| author | Mrmaxmeier <Mrmaxmeier@gmail.com> | 2024-04-27 23:14:36 +0200 |
|---|---|---|
| committer | Mrmaxmeier <Mrmaxmeier@gmail.com> | 2024-07-29 12:35:36 +0200 |
| commit | 0b87af9d4f7c6faa9e89496609f016dc3e3977e1 (patch) | |
| tree | c575ca9c9a0eda82907c10240ce1b3aab732e6b9 /src | |
| parent | 80d8270d8488957f62fbf0df7a19dfe596be92ac (diff) | |
| download | rust-0b87af9d4f7c6faa9e89496609f016dc3e3977e1.tar.gz rust-0b87af9d4f7c6faa9e89496609f016dc3e3977e1.zip | |
Add `-Z embed-source=yes` to embed source code in DWARF debug info
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc/unstable-book/src/compiler-flags/embed-source.md | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/doc/unstable-book/src/compiler-flags/embed-source.md b/src/doc/unstable-book/src/compiler-flags/embed-source.md new file mode 100644 index 00000000000..01a11e37797 --- /dev/null +++ b/src/doc/unstable-book/src/compiler-flags/embed-source.md @@ -0,0 +1,12 @@ +# `embed-source` + +This flag controls whether the compiler embeds the program source code text into +the object debug information section. It takes one of the following values: + +* `y`, `yes`, `on` or `true`: put source code in debug info. +* `n`, `no`, `off`, `false` or no value: omit source code from debug info (the default). + +This flag is ignored in configurations that don't emit DWARF debug information +and is ignored on non-LLVM backends. `-Z embed-source` requires DWARFv5. Use +`-Z dwarf-version=5` to control the compiler's DWARF target version and `-g` to +enable debug info generation. |
