mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
2
BUILD.md
2
BUILD.md
@@ -370,7 +370,7 @@ tools.build:cxxflags=['-DBOOST_ASIO_DISABLE_CONCEPTS']
|
|||||||
```
|
```
|
||||||
|
|
||||||
Available options for SANITIZERS: `Address` and `Thread`
|
Available options for SANITIZERS: `Address` and `Thread`
|
||||||
More details here: [SANITIZERS_README](./docs/build/SANITIZERS_README.md)
|
More details here: [sanitizers](./docs/build/sanitizers.md)
|
||||||
|
|
||||||
To build Debug, in the next step, be sure to set `-DCMAKE_BUILD_TYPE=Debug`
|
To build Debug, in the next step, be sure to set `-DCMAKE_BUILD_TYPE=Debug`
|
||||||
|
|
||||||
|
|||||||
@@ -32,40 +32,38 @@ Follow the same instructions as mentioned in [BUILD.md](../../BUILD.md) but with
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### AddressSanitizer (ASan) + UndefinedBehaviorSanitizer (UBSan)
|
### Build steps:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /path/to/rippled
|
cd /path/to/rippled
|
||||||
rm -rf .build
|
rm -rf .build
|
||||||
mkdir .build
|
mkdir .build
|
||||||
cd .build
|
cd .build
|
||||||
|
|
||||||
# Build with AddressSanitizer. This also builds rippled with UndefinedBehavior sanitizer.
|
|
||||||
SANITIZERS=Address conan install .. --output-folder . --profile sanitizers --build missing --settings build_type=Release
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
# To build with Thread+UndefinedBehavior Sanitizer, replace `SANITIZERS=Address` with `SANITIZERS=Thread`.
|
|
||||||
|
|
||||||
# Configure CMake
|
|
||||||
cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake -Dunity=ON -Dtests=ON -Dxrpld=ON
|
|
||||||
|
|
||||||
# Build
|
|
||||||
cmake --build . --parallel 4
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### ThreadSanitizer (TSan) + UndefinedBehaviorSanitizer (UBSan)
|
#### AddressSanitizer (ASan) + UndefinedBehaviorSanitizer (UBSan)
|
||||||
|
|
||||||
|
Build with AddressSanitizer. This also builds rippled with UndefinedBehavior sanitizer.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /path/to/rippled
|
SANITIZERS=Address conan install .. --output-folder . --profile sanitizers --build missing --settings build_type=Release
|
||||||
rm -rf .build
|
```
|
||||||
mkdir .build
|
|
||||||
cd .build
|
|
||||||
|
|
||||||
|
#### ThreadSanitizer (TSan) + UndefinedBehaviorSanitizer (UBSan)
|
||||||
|
|
||||||
|
```bash
|
||||||
# Build dependencies with Thread sanitizer
|
# Build dependencies with Thread sanitizer
|
||||||
SANITIZERS=Thread conan install .. --output-folder . --profile sanitizers --build missing --settings build_type=Release
|
SANITIZERS=Thread conan install .. --output-folder . --profile sanitizers --build missing --settings build_type=Release
|
||||||
|
```
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
To build with Thread+UndefinedBehavior Sanitizer, replace `SANITIZERS=Address` with `SANITIZERS=Thread`.
|
||||||
|
|
||||||
# Configure CMake
|
# Configure CMake
|
||||||
cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake -Dunity=ON -Dtests=ON -Dxrpld=ON -DCMAKE_BUILD_TYPE=Release
|
|
||||||
|
```bash
|
||||||
|
cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake -Dunity=ON -Dtests=ON -Dxrpld=ON
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
cmake --build . --parallel 4
|
cmake --build . --parallel 4
|
||||||
Reference in New Issue
Block a user