Fuzzing: Allow linking to other fuzzing engines
oss-fuzz sets the environment variable LIB_FUZZING_ENGINE to link with AFL or libFuzzer. If this variable is not set, libFuzzer will be used as before, only that the right qmake variable will be used for doing so. Change-Id: If9fe7739a8d2d4a76f4633a75cad3d2e935f3b61 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
This commit is contained in:
parent
71477104eb
commit
1f87fb359f
@ -2,4 +2,9 @@ QT -= gui
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
SOURCES += main.cpp
|
||||
LIBS += -fsanitize=fuzzer
|
||||
FUZZ_ENGINE = $$(LIB_FUZZING_ENGINE)
|
||||
isEmpty(FUZZ_ENGINE) {
|
||||
QMAKE_LFLAGS += -fsanitize=fuzzer
|
||||
} else {
|
||||
LIBS += $$FUZZ_ENGINE
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
QT += gui
|
||||
SOURCES += main.cpp
|
||||
LIBS += -fsanitize=fuzzer
|
||||
FUZZ_ENGINE = $$(LIB_FUZZING_ENGINE)
|
||||
isEmpty(FUZZ_ENGINE) {
|
||||
QMAKE_LFLAGS += -fsanitize=fuzzer
|
||||
} else {
|
||||
LIBS += $$FUZZ_ENGINE
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
QT += widgets
|
||||
SOURCES += main.cpp
|
||||
LIBS += -fsanitize=fuzzer
|
||||
FUZZ_ENGINE = $$(LIB_FUZZING_ENGINE)
|
||||
isEmpty(FUZZ_ENGINE) {
|
||||
QMAKE_LFLAGS += -fsanitize=fuzzer
|
||||
} else {
|
||||
LIBS += $$FUZZ_ENGINE
|
||||
}
|
||||
|
@ -1,4 +1,9 @@
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
SOURCES += main.cpp
|
||||
LIBS += -fsanitize=fuzzer
|
||||
FUZZ_ENGINE = $$(LIB_FUZZING_ENGINE)
|
||||
isEmpty(FUZZ_ENGINE) {
|
||||
QMAKE_LFLAGS += -fsanitize=fuzzer
|
||||
} else {
|
||||
LIBS += $$FUZZ_ENGINE
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
QT += widgets
|
||||
SOURCES += main.cpp
|
||||
LIBS += -fsanitize=fuzzer
|
||||
FUZZ_ENGINE = $$(LIB_FUZZING_ENGINE)
|
||||
isEmpty(FUZZ_ENGINE) {
|
||||
QMAKE_LFLAGS += -fsanitize=fuzzer
|
||||
} else {
|
||||
LIBS += $$FUZZ_ENGINE
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user