Skip to content

Commit 4b1ce3c

Browse files
committed
docs: updated developer notes for --with-sanitizers to -DSANITIZERS and removed resource for -fsanitze flags
1 parent 0725a37 commit 4b1ce3c

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

doc/developer-notes.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ See the functional test documentation for how to invoke perf within tests.
555555
Bitcoin Core can be compiled with various "sanitizers" enabled, which add
556556
instrumentation for issues regarding things like memory safety, thread race
557557
conditions, or undefined behavior. This is controlled with the
558-
`--with-sanitizers` configure flag, which should be a comma separated list of
558+
`-DSANITIZERS` cmake build flag, which should be a comma separated list of
559559
sanitizers to enable. The sanitizer list should correspond to supported
560560
`-fsanitize=` options in your compiler. These sanitizers have runtime overhead,
561561
so they are most useful when testing changes or producing debugging builds.
@@ -564,10 +564,10 @@ Some examples:
564564

565565
```bash
566566
# Enable both the address sanitizer and the undefined behavior sanitizer
567-
./configure --with-sanitizers=address,undefined
567+
cmake -B build -DSANITIZERS=address,undefined
568568

569569
# Enable the thread sanitizer
570-
./configure --with-sanitizers=thread
570+
cmake -B build -DSANITIZERS=thread
571571
```
572572

573573
If you are compiling with GCC you will typically need to install corresponding
@@ -589,7 +589,7 @@ See the CI config for more examples, and upstream documentation for more informa
589589
about any additional options.
590590

591591
Not all sanitizer options can be enabled at the same time, e.g. trying to build
592-
with `--with-sanitizers=address,thread` will fail in the configure script as
592+
with `-DSANITIZERS=address,thread` will fail in the configure script as
593593
these sanitizers are mutually incompatible. Refer to your compiler manual to
594594
learn more about these options and which sanitizers are supported by your
595595
compiler.
@@ -603,7 +603,6 @@ Additional resources:
603603
* [UndefinedBehaviorSanitizer](https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html)
604604
* [GCC Instrumentation Options](https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html)
605605
* [Google Sanitizers Wiki](https://github.com/google/sanitizers/wiki)
606-
* [Issue #12691: Enable -fsanitize flags in Travis](https://github.com/bitcoin/bitcoin/issues/12691)
607606

608607
Locking/mutex usage notes
609608
-------------------------

0 commit comments

Comments
 (0)