Skip to content

Commit d942fd9

Browse files
updated docs
Signed-off-by: Pratik Mankawde <[email protected]>
1 parent 064d51b commit d942fd9

File tree

2 files changed

+20
-22
lines changed

2 files changed

+20
-22
lines changed

BUILD.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ tools.build:cxxflags=['-DBOOST_ASIO_DISABLE_CONCEPTS']
370370
```
371371
372372
Available options for SANITIZERS: `Address` and `Thread`
373-
More details here: [SANITIZERS_README](./docs/build/SANITIZERS_README.md)
373+
More details here: [sanitizers](./docs/build/sanitizers.md)
374374
375375
To build Debug, in the next step, be sure to set `-DCMAKE_BUILD_TYPE=Debug`
376376

docs/build/SANITIZERS_README.md renamed to docs/build/sanitizers.md

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -32,40 +32,38 @@ Follow the same instructions as mentioned in [BUILD.md](../../BUILD.md) but with
3232

3333
---
3434

35-
### AddressSanitizer (ASan) + UndefinedBehaviorSanitizer (UBSan)
35+
### Build steps:
3636

3737
```bash
38-
cd /path/to/rippled
39-
rm -rf .build
40-
mkdir .build
41-
cd .build
42-
43-
# Build with AddressSanitizer. This also builds rippled with UndefinedBehavior sanitizer.
44-
SANITIZERS=Address conan install .. --output-folder . --profile sanitizers --build missing --settings build_type=Release
45-
# Use `--profile:all sanitizers` if you would like to build all dependencies and libraries (boost etc.) with sanitizers. This might take long time but you won't see some false-positives on sanitizer reports since whole binary will be instrumented.
38+
cd /path/to/rippled
39+
rm -rf .build
40+
mkdir .build
41+
cd .build
42+
```
4643

47-
# To build with Thread+UndefinedBehavior Sanitizer, replace `SANITIZERS=Address` with `SANITIZERS=Thread`.
44+
#### AddressSanitizer (ASan) + UndefinedBehaviorSanitizer (UBSan)
4845

49-
# Configure CMake
50-
cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake -Dunity=ON -Dtests=ON -Dxrpld=ON
46+
Build with AddressSanitizer. This also builds rippled with UndefinedBehavior sanitizer.
5147

52-
# Build
53-
cmake --build . --parallel 4
48+
```bash
49+
SANITIZERS=Address conan install .. --output-folder . --profile sanitizers --build missing --settings build_type=Release
5450
```
5551

56-
### ThreadSanitizer (TSan) + UndefinedBehaviorSanitizer (UBSan)
52+
#### ThreadSanitizer (TSan) + UndefinedBehaviorSanitizer (UBSan)
5753

5854
```bash
59-
cd /path/to/rippled
60-
rm -rf .build
61-
mkdir .build
62-
cd .build
63-
6455
# Build dependencies with Thread sanitizer
6556
SANITIZERS=Thread conan install .. --output-folder . --profile sanitizers --build missing --settings build_type=Release
57+
```
58+
59+
Use `--profile:all sanitizers` if you would like to build all dependencies and libraries (boost etc.) with sanitizers. This might take long time but you won't see some false-positives on sanitizer reports since whole binary will be instrumented.
60+
61+
To build with Thread+UndefinedBehavior Sanitizer, replace `SANITIZERS=Address` with `SANITIZERS=Thread`.
6662

6763
# Configure CMake
68-
cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake -Dunity=ON -Dtests=ON -Dxrpld=ON -DCMAKE_BUILD_TYPE=Release
64+
65+
```bash
66+
cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake -Dunity=ON -Dtests=ON -Dxrpld=ON
6967

7068
# Build
7169
cmake --build . --parallel 4

0 commit comments

Comments
 (0)