mirror of
https://github.com/ceph/ceph
synced 2026-08-02 07:03:18 +00:00
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:
parent
d570f85003
commit
1b02531634
18
README.md
18
README.md
@ -84,10 +84,8 @@ To build Ceph, follow this procedure:
|
|||||||
|
|
||||||
./do_cmake.sh
|
./do_cmake.sh
|
||||||
|
|
||||||
``do_cmake.sh`` by default creates a "debug build" of Ceph, which can be
|
See [build types](#build-types).
|
||||||
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.
|
|
||||||
3. Move into the `build` directory:
|
3. Move into the `build` directory:
|
||||||
|
|
||||||
cd build
|
cd build
|
||||||
@ -127,8 +125,18 @@ To build Ceph, follow this procedure:
|
|||||||
|
|
||||||
ninja install
|
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
|
### CMake Options
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user