aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2021-05-28 13:35:05 +0200
committervanhauser-thc <vh@thc.org>2021-05-28 13:35:05 +0200
commit8e86f7ad803e571bcd275d2aca597997ab0e4d2c (patch)
tree622b587f1195e23107a100b82aa22f06977e16e7 /src
parente5083fbf254cb7f0bffffaeda5c70beff965627c (diff)
downloadafl++-8e86f7ad803e571bcd275d2aca597997ab0e4d2c.tar.gz
add --afl-noopt to afl-cc
Diffstat (limited to 'src')
-rw-r--r--src/afl-cc.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/afl-cc.c b/src/afl-cc.c
index ebe11525..8af8e7b0 100644
--- a/src/afl-cc.c
+++ b/src/afl-cc.c
@@ -1224,6 +1224,14 @@ int main(int argc, char **argv, char **envp) {
if (strncmp(argv[i], "--afl", 5) == 0) {
+ if (!strcmp(argv[i], "--afl_noopt") || !strcmp(argv[i], "--afl-noopt")) {
+
+ passthrough = 1;
+ argv[i] = "-g"; // we have to overwrite it, -g is always good
+ continue;
+
+ }
+
if (compiler_mode)
WARNF(
"--afl-... compiler mode supersedes the AFL_CC_COMPILER and "
@@ -1821,6 +1829,12 @@ int main(int argc, char **argv, char **envp) {
"If anything fails - be sure to read README.lto.md!\n");
#endif
+ SAYF(
+ "\nYou can supply --afl-noopt to not instrument, like AFL_NOOPT. "
+ "(this is helpful\n"
+ "in some build systems if you do not want to instrument "
+ "everything.\n");
+
}
SAYF(