-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Output file collision for PDB debug info when package builds both [lib]
and [bin]
#8519
Comments
Thanks for the report! One possible solution I see here is to use the |
Just to clarify: You suggest that Cargo calls |
Ah yeah this would be Cargo calling @ehuss that seems reasonable to me, and I think it should fix this issue (but haven't tested). I believe the |
Not sure how relevant/helpful this would be to anyone reading, but I also encountered this warning as of August 2023, but everything seems to work fine for now. |
Starting with Cargo v1.45.0 a file collision warning is printed when building a project that generates a shared library (DLL) together with a static binary (EXE):
File
Cargo.toml
is:The library and binary target names differ in using underscores vs. hyphen characters, but apparently the PDB output file for the binary target is
foo_bar.pdb
instead offoo-bar.pdb
. When looking into thetarget\debug\deps
folder it seems that the temporary binary output file is namedtarget\debug\deps\foo_bar.exe
and then later copied intotarget\debug\foo-bar.exe
, converting from underscore to hyphen, while the PDB file keeps the underscore as the (absolute!) filename is stored within the executable file.It might be better to directly generate EXE and PDB output files using the configured binary target name.
The text was updated successfully, but these errors were encountered: