[llvm] r227216 - Add cmake flag LLVM_USE_SANITIZE_COVERAGE
Kostya Serebryany
kcc at google.com
Tue Jan 27 09:59:28 PST 2015
Author: kcc
Date: Tue Jan 27 11:59:28 2015
New Revision: 227216
URL: http://llvm.org/viewvc/llvm-project?rev=227216&view=rev
Log:
Add cmake flag LLVM_USE_SANITIZE_COVERAGE
Summary:
When LLVM_USE_SANITIZE_COVERAGE=YES
and one of the sanitizers is used -fsanitize-coverage=3 will be added
to build flag. This will be used to run a coverage-guided fuzzer on various
llvm libraries.
Test Plan: n/a
Reviewers: rnk
Reviewed By: rnk
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7116
Modified:
llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
Modified: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/HandleLLVMOptions.cmake?rev=227216&r1=227215&r2=227216&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original)
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Tue Jan 27 11:59:28 2015
@@ -410,6 +410,9 @@ if(LLVM_USE_SANITIZER)
else()
message(WARNING "LLVM_USE_SANITIZER is not supported on this platform.")
endif()
+ if (LLVM_USE_SANITIZE_COVERAGE)
+ append("-fsanitize-coverage=4" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ endif()
endif()
# Turn on -gsplit-dwarf if requested
More information about the llvm-commits
mailing list