MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0010636 | CMake | CMake | public | 2010-04-28 15:57 | 2016-06-10 14:31 |
Reporter | Eric Gross | ||||
Assigned To | Kitware Robot | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | moved | ||
Platform | OS | OS Version | |||
Product Version | CMake-2-8 | ||||
Target Version | Fixed in Version | ||||
Summary | 0010636: Visual Studio 'Release' configuration should have usable PDBs generated | ||||
Description | I noticed that the 'Release' configuration has the compilation step not produce debug info (/Zi flag). The linker is still configured to produce a PDB but this contains pretty much no information since the compiled code had no debug info generated. This is a problem because any binaries that we produce and ship to customers always needs preserved symbol information for debugging crash dumps from the field or just doing live debugging with the released binaries. I tried to use the 'ReleaseWithDebugInfo' configuration, but this is a far different configuration than the 'Release' configuration. It is built with incremental linking, inlining options, and unused symbol removal options. It might be useful for some people to debug issues that only appear in optimized code, but the differing compile/link options make these binaries unsuitable for actual release because they are around 50% larger than 'Release' configuration. Since MSVC has the ability to generate external PDBs for fully-optimized code with no runtime size or performance penalty to the resulting binaries, it seems silly that there is no configuration that lets you do this. I think the default 'Release' configuration should always produce a usable PDB. | ||||
Steps To Reproduce | |||||
Additional Information | The workaround I put in our configuration is the following: ############################################################################### # Ensure all builds always have debug info built ############################################################################### IF(WIN32) add_definitions("/Zi") #-------------------------------------------------------------------------- # Since /Zi implies /OPT:NOREF, explicitly enable /OPT:REF on all # release builds (this ensures all unused symbols are stripped) #-------------------------------------------------------------------------- set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /OPT:REF") set(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "${CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL} /OPT:REF") set(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO} /OPT:REF") ENDIF() | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2010-04-28 15:57 | Eric Gross | New Issue | |||
2011-01-17 15:56 | David Cole | Assigned To | => David Cole | ||
2011-01-17 15:56 | David Cole | Status | new => assigned | ||
2011-01-17 16:04 | Eric Gross | Note Added: 0024813 | |||
2011-10-25 22:21 | David Cole | Assigned To | David Cole => | ||
2011-10-25 22:21 | David Cole | Status | assigned => backlog | ||
2013-11-27 11:39 | Christian Bühler | Note Added: 0034592 | |||
2013-11-27 11:43 | Christian Bühler | Note Edited: 0034592 | bug_revision_view_page.php?bugnote_id=34592#r1322 | ||
2016-06-10 14:27 | Kitware Robot | Note Added: 0041688 | |||
2016-06-10 14:27 | Kitware Robot | Status | backlog => resolved | ||
2016-06-10 14:27 | Kitware Robot | Resolution | open => moved | ||
2016-06-10 14:27 | Kitware Robot | Assigned To | => Kitware Robot | ||
2016-06-10 14:31 | Kitware Robot | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|