Add priliminary support for "engine-less" builds.

Needed for #925.
This commit is contained in:
Oliver Chang 2017-10-31 15:22:58 +11:00
parent ceaa1f2433
commit 312cd47208
3 changed files with 6 additions and 3 deletions

View File

@ -22,8 +22,10 @@ if [ -z "${SANITIZER_FLAGS-}" ]; then
export SANITIZER_FLAGS=${!FLAGS_VAR-} export SANITIZER_FLAGS=${!FLAGS_VAR-}
fi fi
# compile script might override environment, use . to call it. if [[ $FUZZING_ENGINE != "none" ]]; then
. compile_${FUZZING_ENGINE} # compile script might override environment, use . to call it.
. compile_${FUZZING_ENGINE}
fi
if [[ $SANITIZER_FLAGS = *sanitize=memory* ]] if [[ $SANITIZER_FLAGS = *sanitize=memory* ]]
then then

View File

@ -28,6 +28,7 @@ CONFIGURATIONS = {
'engine-libfuzzer' : [ 'FUZZING_ENGINE=libfuzzer' ], 'engine-libfuzzer' : [ 'FUZZING_ENGINE=libfuzzer' ],
'engine-afl' : [ 'FUZZING_ENGINE=afl' ], 'engine-afl' : [ 'FUZZING_ENGINE=afl' ],
'engine-honggfuzz' : [ 'FUZZING_ENGINE=honggfuzz' ], 'engine-honggfuzz' : [ 'FUZZING_ENGINE=honggfuzz' ],
'engine-none' : [ 'FUZZING_ENGINE=none' ],
} }
EngineInfo = collections.namedtuple( EngineInfo = collections.namedtuple(

View File

@ -174,7 +174,7 @@ def _get_command_string(command):
def _add_engine_args(parser): def _add_engine_args(parser):
"""Add common engine args.""" """Add common engine args."""
parser.add_argument('--engine', default='libfuzzer', parser.add_argument('--engine', default='libfuzzer',
choices=['libfuzzer', 'afl', 'honggfuzz']) choices=['libfuzzer', 'afl', 'honggfuzz', 'none'])
def _add_sanitizer_args(parser): def _add_sanitizer_args(parser):