diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2021-08-16 15:07:35 +0200 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2022-06-23 16:06:46 +0200 |
| commit | 439c323f9cea37cd2fbae8df624f8502d4ad7b6b (patch) | |
| tree | 39d58ec532384f80b317679a6e48cbc17dd5374b | |
| parent | 7c5fbacaf93f3dc8466f0ad5b91efe088af8afea (diff) | |
| download | rust-439c323f9cea37cd2fbae8df624f8502d4ad7b6b.tar.gz rust-439c323f9cea37cd2fbae8df624f8502d4ad7b6b.zip | |
Disable DWARF debuginfo on Windows
Windows uses PDB instead of DWARF and using DWARF debuginfo causes the linker to give an error
| -rw-r--r-- | src/lib.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs index 9d2e12f9898..e456aa7a04c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -141,7 +141,11 @@ impl<'tcx> CodegenCx<'tcx> { let unwind_context = UnwindContext::new(isa, matches!(backend_config.codegen_mode, CodegenMode::Aot)); - let debug_context = if debug_info { Some(DebugContext::new(tcx, isa)) } else { None }; + let debug_context = if debug_info && !tcx.sess.target.options.is_like_windows { + Some(DebugContext::new(tcx, isa)) + } else { + None + }; CodegenCx { tcx, global_asm: String::new(), |
