[PATCH] D40590: [LibFuzzer] Allow fuzzer to be built standalone
Yi Kong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 28 17:15:18 PST 2017
kongyi created this revision.
Herald added subscribers: Sanitizers, llvm-commits, mgorny.
Add back the ability to build standalone LibFuzzer.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D40590
Files:
lib/fuzzer/CMakeLists.txt
Index: lib/fuzzer/CMakeLists.txt
===================================================================
--- lib/fuzzer/CMakeLists.txt
+++ lib/fuzzer/CMakeLists.txt
@@ -1,3 +1,25 @@
+if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
+ cmake_minimum_required(VERSION 3.4.3)
+
+ project(CompilerRTFuzzer C CXX)
+ set(COMPILER_RT_STANDALONE_BUILD TRUE)
+ list(INSERT CMAKE_MODULE_PATH 0
+ "${CMAKE_SOURCE_DIR}/../../cmake"
+ "${CMAKE_SOURCE_DIR}/../../cmake/Modules")
+ include(base-config-ix)
+ include(CompilerRTUtils)
+
+ load_llvm_config()
+ construct_compiler_rt_default_triple()
+
+ include(config-ix)
+
+ if(APPLE)
+ include(CompilerRTDarwinUtils)
+ endif()
+ include(AddCompilerRT)
+endif()
+
set(LIBFUZZER_SOURCES
FuzzerClangCounters.cpp
FuzzerCrossOver.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40590.124672.patch
Type: text/x-patch
Size: 793 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171129/47ede8fe/attachment.bin>
More information about the llvm-commits
mailing list