mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-12 18:44:59 +01:00
doc: update fuzz instructions when on macOS
Default linker on macOS does not work with recent versions of LLVM. Updated the instructions for fuzzing to use lld instead.
This commit is contained in:
parent
15717f0ef3
commit
75486c8ed8
1 changed files with 5 additions and 2 deletions
|
@ -153,13 +153,16 @@ You may also need to take care of giving the correct path for `clang` and
|
||||||
`clang++`, like `CC=/path/to/clang CXX=/path/to/clang++` if the non-systems
|
`clang++`, like `CC=/path/to/clang CXX=/path/to/clang++` if the non-systems
|
||||||
`clang` does not come first in your path.
|
`clang` does not come first in your path.
|
||||||
|
|
||||||
Full configuration step that was tested on macOS with `brew` installed `llvm`:
|
Using `lld` is required due to issues with Apple's `ld` and `LLVM`.
|
||||||
|
|
||||||
|
Full configuration step for macOS:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
$ brew install llvm lld
|
||||||
$ cmake --preset=libfuzzer \
|
$ cmake --preset=libfuzzer \
|
||||||
-DCMAKE_C_COMPILER="$(brew --prefix llvm)/bin/clang" \
|
-DCMAKE_C_COMPILER="$(brew --prefix llvm)/bin/clang" \
|
||||||
-DCMAKE_CXX_COMPILER="$(brew --prefix llvm)/bin/clang++" \
|
-DCMAKE_CXX_COMPILER="$(brew --prefix llvm)/bin/clang++" \
|
||||||
-DAPPEND_LDFLAGS=-Wl,-no_warn_duplicate_libraries
|
-DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld"
|
||||||
```
|
```
|
||||||
|
|
||||||
Read the [libFuzzer documentation](https://llvm.org/docs/LibFuzzer.html) for more information. This [libFuzzer tutorial](https://github.com/google/fuzzing/blob/master/tutorial/libFuzzerTutorial.md) might also be of interest.
|
Read the [libFuzzer documentation](https://llvm.org/docs/LibFuzzer.html) for more information. This [libFuzzer tutorial](https://github.com/google/fuzzing/blob/master/tutorial/libFuzzerTutorial.md) might also be of interest.
|
||||||
|
|
Loading…
Add table
Reference in a new issue