diff options
| author | Julia Tatz <tatz.j@northeastern.edu> | 2021-04-06 16:00:35 -0400 |
|---|---|---|
| committer | Jynn Nelson <jyn.nelson@redjack.com> | 2023-03-31 07:28:39 -0400 |
| commit | 0504a333837e10f19454901fd060c0f99bf8f5b7 (patch) | |
| tree | 2e398745b33d84894ee367bf07d77bdc14e075fc /compiler/rustc_codegen_ssa | |
| parent | eb3e9c1f45981b47160543cfd882ca00e69bbfab (diff) | |
Preserve, clarify, and extend debug information
`-Cdebuginfo=1` was never line tables only and can't be due to backwards compatibility issues. This was clarified and an option for line tables only was added. Additionally an option for line info directives only was added, which is well needed for some targets. The debug info options should now behave the same as clang's debug info options.
Diffstat (limited to 'compiler/rustc_codegen_ssa')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/linker.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/linker.rs b/compiler/rustc_codegen_ssa/src/back/linker.rs index 69bb00f804d..65dfc325a11 100644 --- a/compiler/rustc_codegen_ssa/src/back/linker.rs +++ b/compiler/rustc_codegen_ssa/src/back/linker.rs @@ -1121,9 +1121,12 @@ impl<'a> Linker for EmLinker<'a> { fn debuginfo(&mut self, _strip: Strip, _: &[PathBuf]) { // Preserve names or generate source maps depending on debug info + // For more information see https://emscripten.org/docs/tools_reference/emcc.html#emcc-g self.cmd.arg(match self.sess.opts.debuginfo { DebugInfo::None => "-g0", - DebugInfo::Limited => "--profiling-funcs", + DebugInfo::Limited | DebugInfo::LineTablesOnly | DebugInfo::LineDirectivesOnly => { + "--profiling-funcs" + } DebugInfo::Full => "-g", }); } |
