You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Probably many tests still use gcc (as opposed to clang) or -O0 (or nothing specified, as opposed to -O2), where there is not a particular reason to do so. Review for tests where we can improve this. Tests where we actually run output built with -O0 will have the most impact.
The text was updated successfully, but these errors were encountered:
We only test with -O0 once per compiler (and not for all compilers).
nothing specified, as opposed to -O2
For make, the default is -Os. For CMake, the default is -O0, but it's -O2 with CMAKE_BUILD_TYPE=Release, -O3 with CMAKE_BUILD_TYPE=Asan and -Os with CMAKE_BUILD_TYPE=Check. We almost always pass a build type to CMake in all.sh but there are a few exceptions and it's Check in a couple of places.
For build-only components, we should use -O1. (-O0 is faster, but misses some static analysis that GCC or Clang can perform.)
Arguably -Os should not be the default. It's what a lot of our users want (in the microcontroller space), but those users typically pass -Os explicitly anyway, because they know they want to optimize for size. Linux distributions and such are more likely to use default settings and would be better served by -O2 or -O3. But that's a separate debate.
Probably many tests still use
gcc
(as opposed toclang
) or-O0
(or nothing specified, as opposed to-O2
), where there is not a particular reason to do so. Review for tests where we can improve this. Tests where we actually run output built with-O0
will have the most impact.The text was updated successfully, but these errors were encountered: