[PATCH] D27993: [libFuzzer] Diff 44 - Update cmake for libFuzzer. Remove requiring LLVM_USE_SANITIZE_COVERAGE .

Marcos Pividori via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 28 09:51:13 PST 2016


mpividori added a comment.

@kcc Ok. So, I see two options to achieve both goals:
 + Force the user to read the docs.
 + Make it work on Windows (don't use instrumentation for FileCheck target).

Or remove these flags, (as this diff does), and add a new cmake flag: `ENABLE_LIBFUZZER` , with default value false.
Or modify `./modules/HandleLLVMOptions.cmake`, to not append "-fsanitize-coverage=trace-pc-guard,indirect-calls,trace-cmp" when `LLVM_USE_SANITIZE_COVERAGE` is true.



================
Comment at: lib/Fuzzer/test/CMakeLists.txt:35
 
+if(NOT "${LLVM_USE_SANITIZER}" STREQUAL "Address")
+  # Enable Address sanitizer.
----------------
kcc wrote:
> Why not add -fsanitize=address unconditionally? 
@kcc Yes, I can do that. I just wanted to avoid duplicating a flag when it is not necessary.


Repository:
  rL LLVM

https://reviews.llvm.org/D27993





More information about the llvm-commits mailing list