]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
README.md: recommend -Og instead of -O0
authorKefu Chai <kchai@redhat.com>
Fri, 16 Jul 2021 02:32:33 +0000 (10:32 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 20 Jul 2021 06:23:59 +0000 (14:23 +0800)
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>
README.md

index e996e1935000b3918f6a0844ede1718477c892fe..a9fe954636294337b45f15fe1e0473e5e82c75e3 100644 (file)
--- a/README.md
+++ b/README.md
@@ -95,7 +95,7 @@ Another example below is building with debugging and alternate locations
 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: