]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
doc/README: add Build Types section 63378/head
authorMatan Breizman <mbreizma@redhat.com>
Tue, 20 May 2025 09:12:18 +0000 (09:12 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Sun, 6 Jul 2025 12:49:46 +0000 (15:49 +0300)
Originated from: https://tracker.ceph.com/issues/71360

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
README.md

index 74185ffb4a84045f70a5e936632dd2fc42671543..2368fb85342199c2062755b8180c88bc0524b22c 100644 (file)
--- a/README.md
+++ b/README.md
@@ -84,10 +84,8 @@ To build Ceph, follow this procedure:
 
        ./do_cmake.sh
 
-   ``do_cmake.sh`` by default creates a "debug build" of Ceph, which can be 
-   up to five times slower than a non-debug build. Pass 
-   ``-DCMAKE_BUILD_TYPE=RelWithDebInfo`` to ``do_cmake.sh`` to create a 
-   non-debug build.
+   See [build types](#build-types).
+
 3. Move into the `build` directory:
 
        cd build
@@ -127,8 +125,18 @@ To build Ceph, follow this procedure:
 
        ninja install
 
-    
+## Build Types
+
+``do_cmake.sh`` by default creates a "debug build" of Ceph (assuming `.git` exists).
+A ``Debug`` build runtime performance may be as little as 20% of that of a non-debug build.
+Pass ``-DCMAKE_BUILD_TYPE=RelWithDebInfo`` to ``do_cmake.sh`` to create a
+non-debug build.
+The default build type is ``RelWithDebInfo`` once `.git` does not exist.
 
+| CMake mode          | Debug info | Optimizations      | Sanitizers          | Checks                   | Use for           |
+| ------------------- | ---------- | -------------------|-------------------- | -------------------------| ------------------|
+| `Debug`             | Yes        | `-Og`              | None                | `ceph_assert`, `assert`  | gdb, development  |
+| `RelWithDebInfo`    | Yes        | `-O2`, `-DNDEBUG`  | None                | `ceph_assert` only       | production        |
  
 ### CMake Options