per https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
> -Og
> Optimize debugging experience. -Og should be the optimization level of
> choice for the standard edit-compile-debug cycle, offering a reasonable
> level of optimization while maintaining fast compilation and a good
> debugging experience. It is a better choice than -O0 for producing
> debuggable code because some compiler passes that collect debug
> information are disabled at -O0.
so instead of using -O0, for better developer experience, -Og is
recommended.
Signed-off-by: Kefu Chai <kchai@redhat.com>
for a couple of external dependencies:
cmake -DLEVELDB_PREFIX="/opt/hyperleveldb" \
- -DCMAKE_INSTALL_PREFIX=/opt/ceph -DCMAKE_C_FLAGS="-O0 -g3 -gdwarf-4" \
+ -DCMAKE_INSTALL_PREFIX=/opt/ceph -DCMAKE_C_FLAGS="-Og -g3 -gdwarf-4" \
..
To view an exhaustive list of -D options, you can invoke `cmake` with: