mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-09 21:50:50 +00:00
6f1b9541ba
Summary: This adds a SHA1 implementation taken from public domain code. The change is trivial, but as it involves third-party code I'd like a second pair of eyes before commit. LibFuzzer can not use SHA1 from openssl because openssl may not be available and because we may be fuzzing openssl itself. Using sha1sum via a pipe is too slow. Test Plan: n/a Reviewers: chandlerc Reviewed By: chandlerc Subscribers: majnemer, llvm-commits Differential Revision: http://reviews.llvm.org/D9733 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237400 91177308-0d34-0410-b5e6-96231b3b80d8
25 lines
650 B
CMake
25 lines
650 B
CMake
set(LIBFUZZER_FLAGS_BASE "${CMAKE_CXX_FLAGS_RELEASE}")
|
|
# Disable the coverage and sanitizer instrumentation for the fuzzer itself.
|
|
set(CMAKE_CXX_FLAGS_RELEASE "${LIBFUZZER_FLAGS_BASE} -O2 -fno-sanitize=all")
|
|
if( LLVM_USE_SANITIZE_COVERAGE )
|
|
add_library(LLVMFuzzerNoMain OBJECT
|
|
FuzzerCrossOver.cpp
|
|
FuzzerTraceState.cpp
|
|
FuzzerDriver.cpp
|
|
FuzzerIO.cpp
|
|
FuzzerLoop.cpp
|
|
FuzzerMutate.cpp
|
|
FuzzerSanitizerOptions.cpp
|
|
FuzzerSHA1.cpp
|
|
FuzzerUtil.cpp
|
|
)
|
|
add_library(LLVMFuzzer STATIC
|
|
FuzzerMain.cpp
|
|
$<TARGET_OBJECTS:LLVMFuzzerNoMain>
|
|
)
|
|
|
|
if( LLVM_INCLUDE_TESTS )
|
|
add_subdirectory(test)
|
|
endif()
|
|
endif()
|