Skip to content

Commit ead257c

Browse files
authored
Use RelWithDebInfo for sanitizers, document build types (#483)
- Build sanitizer tests with RelWithDebInfo - Document that RelWithDebInfo is recommended for sanitizers/valgrind
1 parent a97681a commit ead257c

File tree

4 files changed

+24
-11
lines changed

4 files changed

+24
-11
lines changed

.github/workflows/ubuntu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ jobs:
242242
run: >
243243
cmake -S . -B build -G Ninja
244244
-D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
245-
-D CMAKE_BUILD_TYPE=RELEASE
245+
-D CMAKE_BUILD_TYPE=RelWithDebInfo
246246
-D ENABLE_ADDRESS_SANITIZER=ON -D ENABLE_UB_SANITIZER=ON -D ENABLE_LEAK_SANITIZER=ON
247247
-D CMAKE_INSTALL_PREFIX=install
248248
env:

docs/locale/en/LC_MESSAGES/user_guide/build.po

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,15 @@ msgid "``-D USE_PERF_TESTS=ON`` enable performance tests."
4545
msgstr ""
4646

4747
#: ../../user_guide/build.rst:22
48-
msgid ""
49-
"``-D CMAKE_BUILD_TYPE=Release`` required parameter for stable work of "
50-
"repo."
48+
msgid "``-D CMAKE_BUILD_TYPE=Release`` normal build (default)."
49+
msgstr ""
50+
51+
#: ../../user_guide/build.rst:23
52+
msgid "``-D CMAKE_BUILD_TYPE=RelWithDebInfo`` recommended when using sanitizers or running ``valgrind`` to keep debug information."
53+
msgstr ""
54+
55+
#: ../../user_guide/build.rst:24
56+
msgid "``-D CMAKE_BUILD_TYPE=Debug`` for debugging sessions."
5157
msgstr ""
5258

5359
#: ../../user_guide/build.rst:24

docs/locale/ru/LC_MESSAGES/user_guide/build.po

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,16 @@ msgid "``-D USE_PERF_TESTS=ON`` enable performance tests."
4646
msgstr "``-D USE_PERF_TESTS=ON`` включает тесты на производительность."
4747

4848
#: ../../user_guide/build.rst:22
49-
msgid ""
50-
"``-D CMAKE_BUILD_TYPE=Release`` required parameter for stable work of "
51-
"repo."
52-
msgstr ""
53-
"``-D CMAKE_BUILD_TYPE=Release`` требуемый CMake параметр для стабильной работы "
54-
"репозитория."
49+
msgid "``-D CMAKE_BUILD_TYPE=Release`` normal build (default)."
50+
msgstr "``-D CMAKE_BUILD_TYPE=Release`` нормальная сборка (по умолчанию)."
51+
52+
#: ../../user_guide/build.rst:23
53+
msgid "``-D CMAKE_BUILD_TYPE=RelWithDebInfo`` recommended when using sanitizers or running ``valgrind`` to keep debug information."
54+
msgstr "``-D CMAKE_BUILD_TYPE=RelWithDebInfo`` рекомендуется при использовании санитайзеров или запуске ``valgrind`` для сохранения отладочной информации."
55+
56+
#: ../../user_guide/build.rst:24
57+
msgid "``-D CMAKE_BUILD_TYPE=Debug`` for debugging sessions."
58+
msgstr "``-D CMAKE_BUILD_TYPE=Debug`` используется при отладке."
5559

5660
#: ../../user_guide/build.rst:24
5761
msgid "*A corresponding flag can be omitted if it's not needed.*"

docs/user_guide/build.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ Navigate to a source code folder.
1515

1616
- ``-D USE_FUNC_TESTS=ON`` enable functional tests.
1717
- ``-D USE_PERF_TESTS=ON`` enable performance tests.
18-
- ``-D CMAKE_BUILD_TYPE=Release`` required parameter for stable work of repo.
18+
- ``-D CMAKE_BUILD_TYPE=Release`` normal build (default).
19+
- ``-D CMAKE_BUILD_TYPE=RelWithDebInfo`` recommended when using sanitizers or
20+
running ``valgrind`` to keep debug information.
21+
- ``-D CMAKE_BUILD_TYPE=Debug`` for debugging sessions.
1922

2023
*A corresponding flag can be omitted if it's not needed.*
2124

0 commit comments

Comments
 (0)