[PATCH] D38866: [llvm-isel-fuzzer] Use "--" as separator rather than '='.
Matt Morehouse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 12 17:18:51 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL315647: [llvm-isel-fuzzer] Use "--" as separator rather than '='. (authored by morehouse).
Changed prior to commit:
https://reviews.llvm.org/D38866?vs=118863&id=118867#toc
Repository:
rL LLVM
https://reviews.llvm.org/D38866
Files:
llvm/trunk/docs/FuzzingLLVM.rst
llvm/trunk/include/llvm/FuzzMutate/FuzzerCLI.h
llvm/trunk/lib/FuzzMutate/FuzzerCLI.cpp
llvm/trunk/test/tools/llvm-isel-fuzzer/aarch64-execname-options.ll
llvm/trunk/test/tools/llvm-isel-fuzzer/execname-options.ll
Index: llvm/trunk/docs/FuzzingLLVM.rst
===================================================================
--- llvm/trunk/docs/FuzzingLLVM.rst
+++ llvm/trunk/docs/FuzzingLLVM.rst
@@ -83,7 +83,7 @@
Some flags can also be specified in the binary name itself in order to support
OSS Fuzz, which has trouble with required arguments. To do this, you can copy
-or move ``llvm-isel-fuzzer`` to ``llvm-isel-fuzzer=x-y-z``, where x, y, and z
+or move ``llvm-isel-fuzzer`` to ``llvm-isel-fuzzer--x-y-z``, where x, y, and z
are architecture names (``aarch64``, ``x86_64``), optimization levels (``O0``,
``O2``), or specific keywords like ``gisel`` for enabling global instruction
selection.
Index: llvm/trunk/include/llvm/FuzzMutate/FuzzerCLI.h
===================================================================
--- llvm/trunk/include/llvm/FuzzMutate/FuzzerCLI.h
+++ llvm/trunk/include/llvm/FuzzMutate/FuzzerCLI.h
@@ -28,9 +28,9 @@
/// Handle backend options that are encoded in the executable name.
///
/// Parses some common backend options out of a specially crafted executable
-/// name (argv[0]). For example, a name like llvm-foo-fuzzer:aarch64-gisel might
-/// set up an AArch64 triple and the Global ISel selector. This should be called
-/// *before* parseFuzzerCLOpts if calling both.
+/// name (argv[0]). For example, a name like llvm-foo-fuzzer--aarch64-gisel
+/// might set up an AArch64 triple and the Global ISel selector. This should be
+/// called *before* parseFuzzerCLOpts if calling both.
///
/// This is meant to be used for environments like OSS-Fuzz that aren't capable
/// of passing in command line arguments in the normal way.
Index: llvm/trunk/test/tools/llvm-isel-fuzzer/execname-options.ll
===================================================================
--- llvm/trunk/test/tools/llvm-isel-fuzzer/execname-options.ll
+++ llvm/trunk/test/tools/llvm-isel-fuzzer/execname-options.ll
@@ -4,16 +4,16 @@
; RUN: echo > %t.input
-; RUN: cp llvm-isel-fuzzer %t.bin=gisel
-; RUN: not %t.bin=gisel %t.input 2>&1 | FileCheck -check-prefix=GISEL %s
+; RUN: cp llvm-isel-fuzzer %t.bin--gisel
+; RUN: not %t.bin--gisel %t.input 2>&1 | FileCheck -check-prefix=GISEL %s
; GISEL: Injected args: -global-isel -O0
; GISEL: -mtriple must be specified
-; RUN: cp llvm-isel-fuzzer %t.bin=gisel-O2
-; RUN: not %t.bin=gisel-O2 %t.input 2>&1 | FileCheck -check-prefix=GISEL-O2 %s
+; RUN: cp llvm-isel-fuzzer %t.bin--gisel-O2
+; RUN: not %t.bin--gisel-O2 %t.input 2>&1 | FileCheck -check-prefix=GISEL-O2 %s
; GISEL-O2: Injected args: -global-isel -O0 -O2
; GISEL-O2: -mtriple must be specified
-; RUN: cp llvm-isel-fuzzer %t.bin=unexist
-; RUN: not %t.bin=unexist %t.input 2>&1 | FileCheck -check-prefix=NO-OPT %s
+; RUN: cp llvm-isel-fuzzer %t.bin--unexist
+; RUN: not %t.bin--unexist %t.input 2>&1 | FileCheck -check-prefix=NO-OPT %s
; NO-OPT: Unknown option:
Index: llvm/trunk/test/tools/llvm-isel-fuzzer/aarch64-execname-options.ll
===================================================================
--- llvm/trunk/test/tools/llvm-isel-fuzzer/aarch64-execname-options.ll
+++ llvm/trunk/test/tools/llvm-isel-fuzzer/aarch64-execname-options.ll
@@ -5,14 +5,14 @@
; RUN: echo > %t.input
-; RUN: cp llvm-isel-fuzzer %t.bin=aarch64
-; RUN: %t.bin=aarch64 %t.input 2>&1 | FileCheck -check-prefix=AARCH64 %s
+; RUN: cp llvm-isel-fuzzer %t.bin--aarch64
+; RUN: %t.bin--aarch64 %t.input 2>&1 | FileCheck -check-prefix=AARCH64 %s
; AARCH64: Injected args: -mtriple=aarch64
-; RUN: cp llvm-isel-fuzzer %t.bin=aarch64-O1
-; RUN: %t.bin=aarch64-O1 %t.input 2>&1 | FileCheck -check-prefix=OPT-AFTER %s
+; RUN: cp llvm-isel-fuzzer %t.bin--aarch64-O1
+; RUN: %t.bin--aarch64-O1 %t.input 2>&1 | FileCheck -check-prefix=OPT-AFTER %s
; OPT-AFTER: Injected args: -mtriple=aarch64 -O1
-; RUN: cp llvm-isel-fuzzer %t.bin=O3-aarch64
-; RUN: %t.bin=O3-aarch64 %t.input 2>&1 | FileCheck -check-prefix=OPT-BEFORE %s
+; RUN: cp llvm-isel-fuzzer %t.bin--O3-aarch64
+; RUN: %t.bin--O3-aarch64 %t.input 2>&1 | FileCheck -check-prefix=OPT-BEFORE %s
; OPT-BEFORE: Injected args: -O3 -mtriple=aarch64
Index: llvm/trunk/lib/FuzzMutate/FuzzerCLI.cpp
===================================================================
--- llvm/trunk/lib/FuzzMutate/FuzzerCLI.cpp
+++ llvm/trunk/lib/FuzzMutate/FuzzerCLI.cpp
@@ -34,7 +34,7 @@
void llvm::handleExecNameEncodedBEOpts(StringRef ExecName) {
std::vector<std::string> Args{ExecName};
- auto NameAndArgs = ExecName.split('=');
+ auto NameAndArgs = ExecName.split("--");
if (NameAndArgs.second.empty())
return;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38866.118867.patch
Type: text/x-patch
Size: 4571 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171013/f7532314/attachment.bin>
More information about the llvm-commits
mailing list