我配置gcc作爲如下:在gcc(mingw)配置過程中,我應該使用哪些選項來構建libstdC++。dll而不調試信息?
../configure 前綴=/C/mbuild /釋放--enable共享= ++的libstdc --enable線程--enable版本特定-runtime-libs --enable-languages = c,C++ --with-dwarf2 --disable-sjlj-exceptions --disable -win32-registry --disable-werror --disable -nls --disable-multilib --with -gmp =/c/mbuild/release --with-ppl =/c/mbuild/release --disable-ppl-version-check --with-cloog =/c/mbuild/release --disable-cloog-version- check --with-mpfr =/c/mbuild/release --with-mpc =/c/mbuild/release --enable-libgomp --with-libiconv-prefix =/c/mbuild/release --enable- libstdcxx-debug --enable-cxx-flags =' - s -O2' * --with-boot-ldflags =' - s' * --with-boot-cflags =' - s -O2'--with-boot-cxxflags =' - s -O2'&> config .my.log
和構建:
使-j4 BOOT_CFLAGS = ' - S -O2' BOOT_CPPFLAGS = ' - S -O2' &> make.my.log
我已經全部優化了,exc ept libstdC++ - 6.dll。它的大小是5Mb!
因此...在gcc(mingw)配置過程中,我應該使用哪些選項來構建libstdC++。dll而不調試信息?
注:
我需要調試和發佈的libstdC++版本,所以我用
--enable-libstdcxx調試 - 建立獨立的調試庫除了什麼是正常構建。
此標誌使得另一個libstdC++ - 6.dll(somwhere在lib目錄中),這比dir中的dll更大。
你應該可以在事後調用`strip`命令(保存原始庫並閱讀文檔,可能需要一些嘗試才能獲得正確的選項)。 – 2014-12-28 18:21:01
僅供參考:我沒有看到有關`BOOT_CPPFLAGS`或`BOOT_CXXFLAGS`的任何官方文檔 - 只有`BOOT_CFLAGS`。 – kevinarpe 2015-06-09 00:57:04