Vcpkg: MSVC release configurations use /Z7

Created on 23 Nov 2019  路  6Comments  路  Source: microsoft/vcpkg

All 6 comments

I think we should have the ability to override /Z7. Unfortunately there's no strip function in Windows, so you're stuck with debug information in static libraries.

Whoops, looks like I accidentally unassigned @grdowns from this issue. @NancyLi1013 or @grdowns - can you fix my mistake?

I am interested to find out if there is a genuine reason for setting /Z7 in release configurations as my general understanding is that it is not required and would appear arbitrary.

Without it, we won't have debugging information for libraries in release.

@BillyONeal
Could you please help take a look about this issue?

Thanks.

What @KindDragon said. There's no reason to remove debugging information; we believe CMake's default setting which includes not even stripped symbols in release mode is an incorrect default. Notably, Windows turning on debug information never increases the size of the resulting program, only in the worst case some intermediate files. All our debugging bits end up going into a PDB, and you always want PDBs even in release builds so that you can interpret stack traces etc. later.

Thanks for your detailed explanation to this issue. @BillyONeal

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spindensity picture spindensity  路  3Comments

jasjuang picture jasjuang  路  3Comments

cjvaijo picture cjvaijo  路  3Comments

LilyWangL picture LilyWangL  路  3Comments

F0I0l0I0P picture F0I0l0I0P  路  3Comments