[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
Tue Dec 20 11:29:23 PST 2016
mpividori created this revision.
mpividori added reviewers: kcc, zturner, aizatsky.
mpividori added a subscriber: llvm-commits.
mpividori set the repository for this revision to rL LLVM.
Herald added a subscriber: mgorny.
Hi,
I think we shouldn't require `LLVM_USE_SANITIZER=Address` and `LLVM_USE_SANITIZE_COVERAGE=YES` for building libFuzzer, because:
+ We don't need that options for building `libFuzzer.lib`
+ That cmake options enable instrumentation in all the llvm repository, which is not required for libFuzzer. Also, this generates problems.
For example, in `Fuzzer\test\CMakeLists.txt`, we have the dependency:
add_lit_testsuite(check-fuzzer "Running Fuzzer tests"
${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${TestBinaries} FileCheck not
)
If `LLVM_USE_SANITIZER=Address` and `LLVM_USE_SANITIZE_COVERAGE=YES`, this will trigger the building of target `FileCheck` with sanitizer instrumentation, and we don't need that. Also, it will fail in Windows, since cmake will use link.exe for linking and won't include compiler-rt libraries.
We only need to enable the coverage and address sanitizer for the tests. So, we can include that flags in `Fuzzer\test\CMakeLists.txt`.
Repository:
rL LLVM
https://reviews.llvm.org/D27993
Files:
lib/Fuzzer/CMakeLists.txt
lib/Fuzzer/test/CMakeLists.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27993.82122.patch
Type: text/x-patch
Size: 3560 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161220/ff02a4b0/attachment.bin>
More information about the llvm-commits
mailing list