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
enable debug information in MSVC release build #3873
Conversation
No effect on runtime speed/size. Slightly slower link time, but debugging experience improves by a million times. - /Zi – Store debug information in a .pdb file, not directly in the DLL/EXE - /DEBUG:FULL – generate debug information during link - /PDBALTPATH:%_PDB% – do not store the file system path of the .pdb, just the filename and hash (no disclose paths on distribution) - /OPT:REF /OPT:ICF – remove unreferenced functions and fold identical functions (this was enabled before, but requires explicit enabling if /DEBUG:FULL is specified)
This is not required, and should be withdrawn. Cmake recommends using the default created "ReleaseWithDebug" project configuration for MSVC Release builds that have debug information. Messing with the default CXXFLAGS is almost always a really bad idea. It nearly always means you've misunderstood something. |
Then I’ll open an issue for Assimp’s RelWithDebInfo being broken, because it embeds the debug information into the executable and has some optimizations disabled, therefore it’s very impractical for distribution. Compare |
I think that's a fairly recent regression then, I've been using RelWithDebug for a few years. |
Well, I'm wrong. It's a cmake issue. That's tedious. BTW, /DEBUG:FULL is implied by command-line builds, though best to set it anyway. With MSVC2019 (Draco enabled) I get these sizes for assimp-vc142-mt(d).dll:
I withdraw my objection and will go poke Kitware |
Note: |
No, this is implied by |
Merged, thanks a lot for your contribution. |
No effect on runtime speed/size. Slightly slower link time, but debugging experience improves by a million fold.
/Zi
– Store debug information in a .pdb file, not directly in the binary/DEBUG:FULL
– generate debug information during link/PDBALTPATH:%_PDB%
– do not store the file system path of the .pdb, just the filename and hash (no disclose paths on distribution)/OPT:REF /OPT:ICF
– remove unreferenced functions and fold identical functions (this was enabled before, but is implictly disabled by/DEBUG:FULL
)