File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1- #! /bin/bash -eu
1+ #! /bin/bash -eux
22# Copyright 2016 Google Inc.
33#
44# Licensed under the Apache License, Version 2.0 (the "License");
@@ -27,6 +27,11 @@ fuzz_targets=(
2727if [ " $FUZZING_ENGINE " = honggfuzz ]; then
2828 export CC=" $SRC " /" $FUZZING_ENGINE " /hfuzz_cc/hfuzz-clang
2929 export CXX=" $SRC " /" $FUZZING_ENGINE " /hfuzz_cc/hfuzz-clang++
30+ # hfuzz compilers automatically link libhfuzz, so pass empty fuzzer-lib
31+ # to avoid double-linking
32+ FUZZER_LIB_FLAG=" "
33+ else
34+ FUZZER_LIB_FLAG=" -Dwith-fuzzer-lib=$LIB_FUZZING_ENGINE "
3035fi
3136
3237# cleanup
@@ -35,7 +40,7 @@ mkdir -p "$BUILD"
3540
3641# Configure the project.
3742meson " $BUILD " -Dstatic-dependency=yes -Dinstall-glib=force \
38- -Dwith-fuzzer=yes -Dwith-fuzzer-lib= $LIB_FUZZING_ENGINE \
43+ -Dwith-fuzzer=yes $FUZZER_LIB_FLAG \
3944 -Dfuzzer-link-language=cpp \
4045 || ( cat " $BUILD " /meson-logs/meson-log.txt && false )
4146
You can’t perform that action at this time.
0 commit comments