[PATCH] D38853: [clang-format] Allow building fuzzer with OSS-Fuzz flags.
Matt Morehouse via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 12 11:39:30 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL315603: [clang-format] Allow building fuzzer with OSS-Fuzz flags. (authored by morehouse).
Changed prior to commit:
https://reviews.llvm.org/D38853?vs=118805&id=118819#toc
Repository:
rL LLVM
https://reviews.llvm.org/D38853
Files:
cfe/trunk/tools/clang-format/CMakeLists.txt
cfe/trunk/tools/clang-format/fuzzer/CMakeLists.txt
Index: cfe/trunk/tools/clang-format/fuzzer/CMakeLists.txt
===================================================================
--- cfe/trunk/tools/clang-format/fuzzer/CMakeLists.txt
+++ cfe/trunk/tools/clang-format/fuzzer/CMakeLists.txt
@@ -1,11 +1,15 @@
set(LLVM_LINK_COMPONENTS support)
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=fuzzer")
+if(LLVM_USE_SANITIZE_COVERAGE)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=fuzzer")
+endif()
add_clang_executable(clang-format-fuzzer
EXCLUDE_FROM_ALL
ClangFormatFuzzer.cpp
)
target_link_libraries(clang-format-fuzzer
- ${CLANG_FORMAT_LIB_DEPS})
+ ${CLANG_FORMAT_LIB_DEPS}
+ ${LIB_FUZZING_ENGINE}
+ )
Index: cfe/trunk/tools/clang-format/CMakeLists.txt
===================================================================
--- cfe/trunk/tools/clang-format/CMakeLists.txt
+++ cfe/trunk/tools/clang-format/CMakeLists.txt
@@ -15,7 +15,7 @@
${CLANG_FORMAT_LIB_DEPS}
)
-if( LLVM_USE_SANITIZE_COVERAGE )
+if( LIB_FUZZING_ENGINE OR LLVM_USE_SANITIZE_COVERAGE )
add_subdirectory(fuzzer)
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38853.118819.patch
Type: text/x-patch
Size: 1079 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171012/2d8ad73e/attachment.bin>
More information about the cfe-commits
mailing list