aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/afl-cc.c18
-rw-r--r--src/afl-ld-lto.c10
2 files changed, 11 insertions, 17 deletions
diff --git a/src/afl-cc.c b/src/afl-cc.c
index 6d39b890..cc9854b6 100644
--- a/src/afl-cc.c
+++ b/src/afl-cc.c
@@ -354,11 +354,8 @@ static void edit_params(u32 argc, char **argv, char **envp) {
cc_params[cc_par_cnt++] = "-B";
cc_params[cc_par_cnt++] = obj_path;
- if (clang_mode) {
+ if (clang_mode) { cc_params[cc_par_cnt++] = "-no-integrated-as"; }
- cc_params[cc_par_cnt++] = "-no-integrated-as";
-
- }
}
if (compiler_mode == GCC_PLUGIN) {
@@ -708,7 +705,8 @@ static void edit_params(u32 argc, char **argv, char **envp) {
}
if (getenv("AFL_NO_BUILTIN") || getenv("AFL_LLVM_LAF_TRANSFORM_COMPARES") ||
- getenv("LAF_TRANSFORM_COMPARES") || getenv("AFL_LLVM_LAF_ALL") || lto_mode) {
+ getenv("LAF_TRANSFORM_COMPARES") || getenv("AFL_LLVM_LAF_ALL") ||
+ lto_mode) {
cc_params[cc_par_cnt++] = "-fno-builtin-strcmp";
cc_params[cc_par_cnt++] = "-fno-builtin-strncmp";
@@ -1002,16 +1000,11 @@ int main(int argc, char **argv, char **envp) {
}
-
if (strncmp(callname, "afl-clang", 9) == 0) {
clang_mode = 1;
- if (strncmp(callname, "afl-clang++", 11) == 0) {
-
- plusplus_mode = 1;
-
- }
+ if (strncmp(callname, "afl-clang++", 11) == 0) { plusplus_mode = 1; }
}
@@ -1085,8 +1078,7 @@ int main(int argc, char **argv, char **envp) {
if (instrument_mode == 0)
instrument_mode = INSTRUMENT_CFG;
else if (instrument_mode != INSTRUMENT_CFG)
- FATAL(
- "you cannot set AFL_LLVM_INSTRUMENT and AFL_LLVM_INSTRIM together");
+ FATAL("you cannot set AFL_LLVM_INSTRUMENT and AFL_LLVM_INSTRIM together");
}
diff --git a/src/afl-ld-lto.c b/src/afl-ld-lto.c
index e6ea1f1d..16feaa80 100644
--- a/src/afl-ld-lto.c
+++ b/src/afl-ld-lto.c
@@ -182,10 +182,12 @@ static void edit_params(int argc, char **argv) {
instrim = 1;
if (debug)
- DEBUGF("passthrough=%s instrim=%d, gold_pos=%d, gold_present=%s inst_present=%s rt_present=%s rt_lto_present=%s\n",
- passthrough ? "true" : "false", instrim, gold_pos,
- gold_present ? "true" : "false", inst_present ? "true" : "false",
- rt_present ? "true" : "false", rt_lto_present ? "true" : "false");
+ DEBUGF(
+ "passthrough=%s instrim=%d, gold_pos=%d, gold_present=%s "
+ "inst_present=%s rt_present=%s rt_lto_present=%s\n",
+ passthrough ? "true" : "false", instrim, gold_pos,
+ gold_present ? "true" : "false", inst_present ? "true" : "false",
+ rt_present ? "true" : "false", rt_lto_present ? "true" : "false");
for (i = 1; i < argc; i++) {