about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/afl-cc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/afl-cc.c b/src/afl-cc.c
index 6bdb9572..1448d8ae 100644
--- a/src/afl-cc.c
+++ b/src/afl-cc.c
@@ -555,7 +555,8 @@ static void edit_params(u32 argc, char **argv, char **envp) {
 
     if (lto_mode && !have_c) {
 
-      u8 *ld_path = strdup(AFL_REAL_LD);
+      u8 *ld_path = NULL;
+      if (getenv("AFL_REAL_LD")) { ld_path = strdup(getenv("AFL_REAL_LD")); }
       if (!ld_path || !*ld_path) { ld_path = strdup("ld.lld"); }
       if (!ld_path) { PFATAL("Could not allocate mem for ld_path"); }
 #if defined(AFL_CLANG_LDPATH) && LLVM_MAJOR >= 12