summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2018-07-20 12:24:08 +0200
committerPatrick Steinhardt <ps@pks.im>2018-08-03 09:50:35 +0200
commit12804c4600d3aef879ac09b50563f9bf1efea540 (patch)
tree00021b1c2f4720f475936bc1be880fd6ec4f85e6 /docs
parentad0cb297bd867882e6d84bd9e556d237b43647d8 (diff)
downloadlibgit2-12804c4600d3aef879ac09b50563f9bf1efea540.tar.gz
cmake: remove USE_SANITIZER and USE_COVERAGE options
Both the USE_SANITIZER and USE_COVERAGE options are convenience options that turn on a set of CFLAGS. Despite our own set of CFLAGS required to build libgit2, we have no real business to mess with them, though, as they can easily be passed in by the user via specifying the CFLAGS environment variable. The reasoning behind not providing them is that as soon as we start adding those for some usecases, users might ask for other sets of CFLAGS catering to their specific need in another usecase. Thus, we do not want to support them here.
Diffstat (limited to 'docs')
-rw-r--r--docs/fuzzing.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/fuzzing.md b/docs/fuzzing.md
index 9d32f8747..cd825766b 100644
--- a/docs/fuzzing.md
+++ b/docs/fuzzing.md
@@ -18,10 +18,10 @@ automated fuzz testing. libFuzzer only works with clang.
[`undefined`](https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html),
and [`leak`/`address,leak`](https://clang.llvm.org/docs/LeakSanitizer.html).
3. Create the cmake build environment and configure the build with the
- sanitizer chosen: `CC=/usr/bin/clang-6.0 cmake
- -DBUILD_CLAR=OFF -DBUILD_FUZZERS=ON -DUSE_SANITIZER=address
- -DCMAKE_BUILD_TYPE=RelWithDebInfo ..`. Note that building the fuzzer targets
- is incompatible with the tests and examples.
+ sanitizer chosen: `CC=/usr/bin/clang-6.0 CFLAGS="-fsanitize=address" cmake
+ -DBUILD_CLAR=OFF -DBUILD_FUZZERS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo ..`.
+ Note that building the fuzzer targets is incompatible with the
+ tests and examples.
4. Build libgit2: `cmake --build .`
5. Exit the cmake build environment: `cd ..`
@@ -38,8 +38,8 @@ will write the coverage report.
## Get coverage
-In order to get coverage information, you also need to add the
-`-DUSE_COVERAGE=ON` flag to `cmake`, and then run the fuzz target with
+In order to get coverage information, you need to add the "-fcoverage-mapping"
+and "-fprofile-instr-generate CFLAGS, and then run the fuzz target with
`-runs=0`. That will produce a file called `default.profraw` (this behavior can
be overridden by setting the `LLVM_PROFILE_FILE="yourfile.profraw"` environment
variable).