summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-isel-fuzzer
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2017-08-31 00:36:33 +0000
committerJustin Bogner <mail@justinbogner.com>2017-08-31 00:36:33 +0000
commit5204717208fd86e3e0414849c5a9813736cceb53 (patch)
tree76be1d882edf49471dd531f7dc6b169b2d717e08 /llvm/tools/llvm-isel-fuzzer
parent28454efc677b718be3b000aaeabafc1788bb3258 (diff)
downloadbcm5719-llvm-5204717208fd86e3e0414849c5a9813736cceb53.tar.gz
bcm5719-llvm-5204717208fd86e3e0414849c5a9813736cceb53.zip
cmake: Invent add_llvm_fuzzer to set up fuzzer targets
This moves the cmake configuration for fuzzers in LLVM to a new macro, add_llvm_fuzzer. This will make it easier to keep things consistent while implementing llvm.org/pr34314. I've also made a couple of minor functional changes here: - the fuzzers now use add_llvm_executable rather than add_llvm_tool. This means they won't create install targets and stuff like that, because those made little sense for these fuzzers. - I've grouped these under "Fuzzers" rather than in with "Tools" for people who build with IDEs. llvm-svn: 312200
Diffstat (limited to 'llvm/tools/llvm-isel-fuzzer')
-rw-r--r--llvm/tools/llvm-isel-fuzzer/CMakeLists.txt35
1 files changed, 15 insertions, 20 deletions
diff --git a/llvm/tools/llvm-isel-fuzzer/CMakeLists.txt b/llvm/tools/llvm-isel-fuzzer/CMakeLists.txt
index c53e3a381ee..474bcf928eb 100644
--- a/llvm/tools/llvm-isel-fuzzer/CMakeLists.txt
+++ b/llvm/tools/llvm-isel-fuzzer/CMakeLists.txt
@@ -1,20 +1,15 @@
-if( LLVM_USE_SANITIZE_COVERAGE )
-
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=fuzzer")
- set(LLVM_LINK_COMPONENTS
- ${LLVM_TARGETS_TO_BUILD}
- Analysis
- AsmPrinter
- CodeGen
- Core
- FuzzMutate
- IRReader
- MC
- ScalarOpts
- SelectionDAG
- Support
- Target
- )
- add_llvm_tool(llvm-isel-fuzzer
- llvm-isel-fuzzer.cpp)
-endif()
+set(LLVM_LINK_COMPONENTS
+ ${LLVM_TARGETS_TO_BUILD}
+ Analysis
+ AsmPrinter
+ CodeGen
+ Core
+ FuzzMutate
+ IRReader
+ MC
+ ScalarOpts
+ SelectionDAG
+ Support
+ Target
+)
+add_llvm_fuzzer(llvm-isel-fuzzer llvm-isel-fuzzer.cpp)
OpenPOWER on IntegriCloud