Details
Description
This is an offspring of MDEV-6016, which fixed the immediate problem of packages not being built with cmake 2.8.12 due to the missing pdb files.
However, it means that static libraries won't have debug information, which might be sometimes needed. Since including the debug info costs considerable increase of the package size, I think it makes sense to keep it open for now and see if anybody actually requests it.
Here is Wlad's comment and proposed fix (from comments to MDEV-6016):
I tested the mentioned change for debuginfo format from /Zi to /Z7, and it seems to work well. The noticable change is that static libraries will be bigger in size (this of course applies to the libraries themselves, not to programs they link to). So I conclude, if the size of embedded library = 300M does not bother too many people, /Z7 should be quite ok. The whole patch is below.
=== modified file 'cmake/os/Windows.cmake'
--- cmake/os/Windows.cmake 2011-06-30 15:46:53 +0000
+++ cmake/os/Windows.cmake 2014-04-04 06:02:17 +0000
@@ -71,13 +71,15 @@
SET(CMAKE_{type}_LINKER_FLAGS_RELEASE "${CMAKE_${type}_LINKER_FLAGS_RELEASE} /debug")
ENDFOREACH()
- # Force static runtime libraries
+ # Force static runtime libraries.
+ # Force /Z7 instead of default /Zi to have debug symbols in static libraries.
FOREACH(flag
CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG_INIT
CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG_INIT)
STRING(REPLACE "/MD" "/MT" "${flag}" "${${flag}}")
+ STRING(REPLACE "/Zi" "/Z7" "${flag}" "${${flag}}")
ENDFOREACH()
# Remove support for exceptions
Here are results of my measurements for package size change:
VS 10 / cmake 2.8.5, 4131 before Zi=>Z7 141813729 mariadb-5.5.37-winx64.zip 72740006 mysqlserver.lib 644775646 mariadb-5.5.37-winx64 VS 10 / cmake 2.8.5, 4131 after Zi=>Z7 186232673 mariadb-5.5.37-winx64.zip 223535446 mysqlserver.lib 800908270 mariadb-5.5.37-winx64 VS 11 / cmake 2.8.12 4131 before Zi=>Z7 147336732 mariadb-5.5.37-winx64.zip 74633374 mysqlserver.lib 647495889 mariadb-5.5.37-winx64 VS 11 / cmake 2.8.12 4131 after Zi=>Z7 213447432 mariadb-5.5.37-winx64.zip 602570110 mysqlserver.lib 1182596977 mariadb-5.5.37-winx64
Gliffy Diagrams
Attachments
Issue Links
- relates to
-
MDEV-6016 Packaging error with cmake 2.8.12 and greater.
-
- Closed
-
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions