mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-09 00:31:33 +00:00
commit
661b626c87
@ -40,7 +40,7 @@ def check_clang_format_pip_version():
|
|||||||
if importlib.util.find_spec('clang_format'):
|
if importlib.util.find_spec('clang_format'):
|
||||||
# Check if the installed version is the expected LLVM version
|
# Check if the installed version is the expected LLVM version
|
||||||
if importlib.metadata.version('clang-format')\
|
if importlib.metadata.version('clang-format')\
|
||||||
.startswith(CURRENT_LLVM+'.'):
|
.startswith(str(CURRENT_LLVM)+'.'):
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
# Return False, because the clang-format version does not match
|
# Return False, because the clang-format version does not match
|
||||||
|
@ -1787,14 +1787,16 @@ static void registerLTOPass(const PassManagerBuilder &,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LLVM_VERSION_MAJOR < 16
|
||||||
static RegisterStandardPasses RegisterCompTransPass(
|
static RegisterStandardPasses RegisterCompTransPass(
|
||||||
PassManagerBuilder::EP_OptimizerLast, registerLTOPass);
|
PassManagerBuilder::EP_OptimizerLast, registerLTOPass);
|
||||||
|
|
||||||
static RegisterStandardPasses RegisterCompTransPass0(
|
static RegisterStandardPasses RegisterCompTransPass0(
|
||||||
PassManagerBuilder::EP_EnabledOnOptLevel0, registerLTOPass);
|
PassManagerBuilder::EP_EnabledOnOptLevel0, registerLTOPass);
|
||||||
|
|
||||||
#if LLVM_VERSION_MAJOR >= 11
|
#if LLVM_VERSION_MAJOR >= 11
|
||||||
static RegisterStandardPasses RegisterCompTransPassLTO(
|
static RegisterStandardPasses RegisterCompTransPassLTO(
|
||||||
PassManagerBuilder::EP_FullLinkTimeOptimizationLast, registerLTOPass);
|
PassManagerBuilder::EP_FullLinkTimeOptimizationLast, registerLTOPass);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
22
src/afl-as.c
22
src/afl-as.c
@ -93,7 +93,7 @@ static u8 use_64bit = 0;
|
|||||||
static void edit_params(int argc, char **argv) {
|
static void edit_params(int argc, char **argv) {
|
||||||
|
|
||||||
u8 *tmp_dir = getenv("TMPDIR"), *afl_as = getenv("AFL_AS");
|
u8 *tmp_dir = getenv("TMPDIR"), *afl_as = getenv("AFL_AS");
|
||||||
u32 i;
|
u32 i, input_index;
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
|
|
||||||
@ -142,7 +142,23 @@ static void edit_params(int argc, char **argv) {
|
|||||||
|
|
||||||
as_params[argc] = 0;
|
as_params[argc] = 0;
|
||||||
|
|
||||||
for (i = 1; (s32)i < argc - 1; i++) {
|
/* Find the input file. It's usually located near the end.
|
||||||
|
Assume there won't be any arguments referring to files after the input
|
||||||
|
file, e.g. as input.s -o output.o */
|
||||||
|
for (input_index = argc - 1; input_index > 0; input_index--) {
|
||||||
|
|
||||||
|
input_file = argv[input_index];
|
||||||
|
/* Clang may add debug arguments after the input file. */
|
||||||
|
if (strncmp(input_file, "-g", 2)) break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (input_index == 0)
|
||||||
|
FATAL("Could not find input file (not called through afl-gcc?)");
|
||||||
|
|
||||||
|
for (i = 1; (s32)i < argc; i++) {
|
||||||
|
|
||||||
|
if (i == input_index) continue;
|
||||||
|
|
||||||
if (!strcmp(argv[i], "--64")) {
|
if (!strcmp(argv[i], "--64")) {
|
||||||
|
|
||||||
@ -194,8 +210,6 @@ static void edit_params(int argc, char **argv) {
|
|||||||
|
|
||||||
#endif /* __APPLE__ */
|
#endif /* __APPLE__ */
|
||||||
|
|
||||||
input_file = argv[argc - 1];
|
|
||||||
|
|
||||||
if (input_file[0] == '-') {
|
if (input_file[0] == '-') {
|
||||||
|
|
||||||
if (!strcmp(input_file + 1, "-version")) {
|
if (!strcmp(input_file + 1, "-version")) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user