- CMake has some weird flag defaults for RelWithDebInfo on Windows, where it includes /INCREMENTAL which is a development feature, and increases binary size and is cache unfriendly.
- RelWithDebInfo on Windows also includes /Ob1, which disables automatic inlining
- We should use -O2 for both Release and RelWithDebInfo configs. With GCC / AppleClang, Release defaults to -O3, while RelWithDebInfo to -O2.
- In general we should make RelWithDebInfo be equal to Release + the debug generation flag.
We aim to use RelWithDebInfo for Packaging configurations, so it's important to get them right.
|For Gerrit Dashboard: QTBUG-85992|
|310545,13||CMake: Adjust compiler flag optimizations to qmake mkspec ones||dev||qt/qtbase||Status: MERGED||+2||0|
|310600,5||CMake: Add /OPT:REF flag when building Qt on Windows||dev||qt/qtbase||Status: MERGED||+2||0|
|329068,5||Prevent compiler and linker flags from growing every cmake run||dev||qt/qtbase||Status: MERGED||+2||0|