Copy .pdb files to target directory#5179
Conversation
|
(rust_highfive has picked a reviewer for you, use r? to override) |
src/cargo/ops/cargo_rustc/context.rs
Outdated
There was a problem hiding this comment.
I am not sure this is exactly what we want.
If you crate is a
[lib]
crate-type = [ "cdylib" ]
you might actually be interested in debuginfo as well?
There was a problem hiding this comment.
True yeah, but I think it's fine to always fix that in a follow up (or when it arises)
tests/testsuite/build.rs
Outdated
There was a problem hiding this comment.
I think this may also want a target_env filter
`.pdb` files are for windows debug info (unlike on linux, debug info is in a separate file). Windows executable actually hard-code paths to `.pdb` files, so debugging mvsc rust programs works even without this patch. However, if you want to distribute the executable to other machines, you'd better distribute both `foo.exe` and `foo.pdb`, because absolute paths won't work on another machine. Having same-named .pdb file alongside the binary would work though. closes rust-lang#4960
|
@bors: r+ |
|
📌 Commit 9c0d3f2 has been approved by |
|
⌛ Testing commit 9c0d3f2 with merge 4b8872f9d70bba93df69fa9ef4da7e520a172838... |
|
💔 Test failed - status-appveyor |
Depending on the OS, there might be an additional artifacts for debuginfo (dSYM folder for macs, .pbd file for windows). Given that we can't disable `.pdb` for windows[1], let's just ignore all filenames! [1]: rust-lang/rust#28505)
|
@bors: r+ |
|
📌 Commit f930609 has been approved by |
Copy `.pdb` files to `target` directory `.pdb` files are for windows debug info (unlike on linux, debug info is in a separate file). Windows executable actually hard-code paths to `.pdb` files, so debugging mvsc rust programs works even without this patch. However, if you want to distribute the executable to other machines, you'd better distribute both `foo.exe` and `foo.pdb`, because absolute paths won't work on another machine. Having same-named .pdb file alongside the binary would work though. closes #4960
|
☀️ Test successful - status-appveyor, status-travis |
EFI also uses the PE format with .pdb files, and rustc generates them, but Cargo does not copy them out of target/*/deps. This is an oversight, so this PR fixes it. Related: rust-osdev/uefi-rs#289 Related: rust-lang#5179
.pdbfiles are for windows debug info (unlike on linux, debug info isin a separate file). Windows executable actually hard-code paths to
.pdbfiles, so debugging mvsc rust programs works even without thispatch. However, if you want to distribute the executable to other
machines, you'd better distribute both
foo.exeandfoo.pdb, becauseabsolute paths won't work on another machine. Having same-named .pdb
file alongside the binary would work though.
closes #4960