- 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.