mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-17 12:18:08 +00:00
Little tweaks
This commit is contained in:
@ -106,6 +106,7 @@ static void find_obj(u8* argv0) {
|
|||||||
static void edit_params(u32 argc, char** argv) {
|
static void edit_params(u32 argc, char** argv) {
|
||||||
|
|
||||||
u8 fortify_set = 0, asan_set = 0, x_set = 0, maybe_linking = 1, bit_mode = 0;
|
u8 fortify_set = 0, asan_set = 0, x_set = 0, maybe_linking = 1, bit_mode = 0;
|
||||||
|
u8 has_llvm_config = 0;
|
||||||
u8* name;
|
u8* name;
|
||||||
|
|
||||||
cc_params = ck_alloc((argc + 128) * sizeof(u8*));
|
cc_params = ck_alloc((argc + 128) * sizeof(u8*));
|
||||||
@ -116,16 +117,20 @@ static void edit_params(u32 argc, char** argv) {
|
|||||||
else
|
else
|
||||||
++name;
|
++name;
|
||||||
|
|
||||||
|
has_llvm_config = (strlen(LLVM_BINDIR) > 0);
|
||||||
|
|
||||||
if (!strcmp(name, "afl-clang-fast++")) {
|
if (!strcmp(name, "afl-clang-fast++")) {
|
||||||
|
|
||||||
u8* alt_cxx = getenv("AFL_CXX");
|
u8* alt_cxx = getenv("AFL_CXX");
|
||||||
snprintf(llvm_fullpath, sizeof(llvm_fullpath), "%s/clang++", LLVM_BINDIR);
|
if (has_llvm_config) snprintf(llvm_fullpath, sizeof(llvm_fullpath), "%s/clang++", LLVM_BINDIR);
|
||||||
|
else sprintf(llvm_fullpath, "clang++");
|
||||||
cc_params[0] = alt_cxx ? alt_cxx : (u8*)llvm_fullpath;
|
cc_params[0] = alt_cxx ? alt_cxx : (u8*)llvm_fullpath;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
u8* alt_cc = getenv("AFL_CC");
|
u8* alt_cc = getenv("AFL_CC");
|
||||||
snprintf(llvm_fullpath, sizeof(llvm_fullpath), "%s/clang", LLVM_BINDIR);
|
if (has_llvm_config) snprintf(llvm_fullpath, sizeof(llvm_fullpath), "%s/clang", LLVM_BINDIR);
|
||||||
|
else sprintf(llvm_fullpath, "clang");
|
||||||
cc_params[0] = alt_cc ? alt_cc : (u8*)llvm_fullpath;
|
cc_params[0] = alt_cc ? alt_cc : (u8*)llvm_fullpath;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user