]> granicus.if.org Git - llvm/commit
Re-commit "llvm-isel-fuzzer: Handle a subset of backend flags in the exec name"
authorJustin Bogner <mail@justinbogner.com>
Thu, 12 Oct 2017 04:35:32 +0000 (04:35 +0000)
committerJustin Bogner <mail@justinbogner.com>
Thu, 12 Oct 2017 04:35:32 +0000 (04:35 +0000)
commit58658afbec9d484721152cd267c6759c5d6f3551
treed8fe2b033e64fdd627635ca37e2bf029b0227197
parentfff82ffa0eef867b9383c0852af919e0e1f6e91a
Re-commit "llvm-isel-fuzzer: Handle a subset of backend flags in the exec name"

Here we add a secondary option parser to llvm-isel-fuzzer (and provide
it for use with other fuzzers). With this, you can copy the fuzzer to
a name like llvm-isel-fuzzer=aarch64-gisel for a fuzzer that fuzzer
AArch64 with GlobalISel enabled, or fuzzer=x86_64 to fuzz x86, with no
flags required. This should be useful for running these in OSS-Fuzz.

Note that this handrolls a subset of cl::opts to recognize, rather
than embedding a complete command parser for argv[0]. If we find we
really need the flexibility of handling arbitrary options at some
point we can rethink this.

This re-applies 315545 using "=" instead of ":" as a separator for
arguments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315557 91177308-0d34-0410-b5e6-96231b3b80d8
docs/FuzzingLLVM.rst
include/llvm/FuzzMutate/FuzzerCLI.h
lib/FuzzMutate/FuzzerCLI.cpp
test/tools/llvm-isel-fuzzer/aarch64-execname-options.ll [new file with mode: 0644]
test/tools/llvm-isel-fuzzer/execname-options.ll [new file with mode: 0644]
tools/llvm-isel-fuzzer/llvm-isel-fuzzer.cpp