Files
scylladb/cmake
Kefu Chai 8a54e478ba build: cmake: use -O0 for debug build
per clang's document, -Og is like -O1, which is in turn an optimization
level between -O0 and -O2. -O0 "generates the most debuggable code".
for instance, with -O0, presumably, the variables are not allocated in
the registers and later get overwritten, they are always allocated on
the stack. this helps with the debugging.

in this change, -O0 is used for better debugging experience. the
downside is that the emitted code size will be greater than the one
emitted from -Og, and the executable will be slower.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes #14210
2023-06-13 18:25:36 +03:00
..