Skip to content

hadrian: use -Og as C/C++ optimization level when debugging

Cheng Shao requested to merge type-dance/ghc:debug-Og into master

This patch enables -Og as optimization level when compiling the debug ways of rts, as well as when compiling C/C++ with the +debug_info flavour transformer. According to gcc documentation (https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-Og), -Og is a better choice than -O0 for producing debuggable code. It's also supported by clang as well, so it makes sense to use it as a default for debugging.

Merge request reports