Skip to content

Commit 9859bb9

Browse files
committed
fuzz: document -D flag for faster development builds
1 parent c722443 commit 9859bb9

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

fuzz/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,19 @@ cargo +nightly fuzz run --features "libfuzzer_fuzz" msg_ping_target
6868
Note: If you encounter a `SIGKILL` during run/build check for OOM in kernel logs and consider
6969
increasing RAM size for VM.
7070

71+
##### Fast builds for development
72+
73+
The default build uses LTO and single codegen unit, which is slow. For faster iteration during
74+
development, use the `-D` (dev) flag:
75+
76+
```shell
77+
cargo +nightly fuzz run --features "libfuzzer_fuzz" -D msg_ping_target
78+
```
79+
80+
The `-D` flag builds in development mode with faster compilation (still has optimizations via
81+
`opt-level = 1`). The first build will be slow as it rebuilds the standard library with
82+
sanitizer instrumentation, but subsequent builds will be fast.
83+
7184
If you wish to just generate fuzzing binary executables for `libFuzzer` and not run them:
7285
```shell
7386
cargo +nightly fuzz build --features "libfuzzer_fuzz" msg_ping_target

0 commit comments

Comments
 (0)