doc/README: add Build Types section
Originated from: https://tracker.ceph.com/issues/71360 Signed-off-by: Matan Breizman <mbreizma@redhat.com>
This commit is contained in:
18
README.md
18
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user