You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem
When cargo builds a target is passes -C extra-filename=-... to rustc which produces an output file with a metadata suffix in the name. For windows targets this will produce foo-metadata.exe and foo-metadata.pdb files. It then copies and renames these files so the final result is foo.exe and foo.pdb.
However the debug data in a PE executable files stores the original name of the PDB file and this name is used when debuggers (Visual Studio, WinDbg or anything using dbghelp.dll) are searching for PDB files on symbol servers. So when looking for the PDB file for foo.exe, it will actually search for foo-metadata.pdb which has likely not been uploaded.
Possible Solution(s)
Ideally it would be possible to specify in the Cargo.toml that extra-filename should not be used for certain profiles, e.g.:
[profile.release]
add-extra-filename = false
Notes
Output of cargo version: cargo 1.33.0 (f099fe9 2019-02-12)
The text was updated successfully, but these errors were encountered:
Adding: Specifying cargo rustc -- -o filename does not ignore -C extra-filename. Nor does -C extra-filename="". Also, rustc warns that -C extra-filename is ignored, but it is not:
$ mkdir output-filename
$ cd output-filename/
$ cargo init
Created binary (application) package
$ cargo rustc -v --release -- -o filename
Compiling output-filename v0.1.0 (/private/tmp/output-filename)
Running `rustc --edition=2018 --crate-name output_filename src/main.rs --color always --crate-type bin --emit=dep-info,link -C opt-level=3 -o filename -C metadata=c961d75f8bcf3c48 -C extra-filename=-c961d75f8bcf3c48 --out-dir /private/tmp/output-filename/target/release/deps -L dependency=/private/tmp/output-filename/target/release/deps`
warning: due to multiple output types requested, the explicitly specified output file name will be adapted for each output type
warning: ignoring --out-dir flag due to -o flag
warning: ignoring -C extra-filename flag due to -o flag
Finished release [optimized] target(s) in 0.39s
$ ls
Cargo.lock filename-c961d75f8bcf3c48 src
Cargo.toml filename-c961d75f8bcf3c48.d target
Problem
When cargo builds a target is passes
-C extra-filename=-...
to rustc which produces an output file with a metadata suffix in the name. For windows targets this will producefoo-metadata.exe
andfoo-metadata.pdb
files. It then copies and renames these files so the final result isfoo.exe
andfoo.pdb
.However the debug data in a PE executable files stores the original name of the PDB file and this name is used when debuggers (Visual Studio, WinDbg or anything using dbghelp.dll) are searching for PDB files on symbol servers. So when looking for the PDB file for foo.exe, it will actually search for foo-metadata.pdb which has likely not been uploaded.
Possible Solution(s)
Ideally it would be possible to specify in the
Cargo.toml
that extra-filename should not be used for certain profiles, e.g.:Notes
Output of
cargo version
: cargo 1.33.0 (f099fe9 2019-02-12)The text was updated successfully, but these errors were encountered: