File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -20,10 +20,14 @@ set -euxo pipefail
2020# Use it for unsetting any environment variables that may impact other building
2121# processes.
2222
23+ if [[ -n " ${PRE_LIB_FUZZING_ENGINE} " ]]; then
24+ export LIB_FUZZING_ENGINE=" ${PRE_LIB_FUZZING_ENGINE} "
25+ fi
26+
2327unset TARGET_DIR
2428unset CGO_ENABLED
2529unset LIBRARY_PATH
2630unset PKG_CONFIG_PATH
2731unset CGO_CFLAGS
2832unset CGO_LDFLAGS
29- unset ADDITIONAL_LIBS
33+ unset PRE_LIB_FUZZING_ENGINE
Original file line number Diff line number Diff line change @@ -62,4 +62,15 @@ export PKG_CONFIG_PATH="${TARGET_DIR}/lib/pkgconfig"
6262export CGO_CFLAGS=" -I${TARGET_DIR} /include"
6363export CGO_LDFLAGS=" $( pkg-config --libs --static --cflags libgit2) "
6464
65- export ADDITIONAL_LIBS=" ${TARGET_DIR} /lib/libgit2.a"
65+ # Temporary hack whilst libgit2 is still in use.
66+ # Enables the fuzzing compilation to link libgit2.
67+ #
68+ # After building the fuzzers, the value of
69+ # LIB_FUZZING_ENGINE is reset to what it was before
70+ # it to avoid side effects onto other repositories.
71+ #
72+ # For context refer to:
73+ # https://github.com/google/oss-fuzz/pull/9063
74+ export PRE_LIB_FUZZING_ENGINE=" ${LIB_FUZZING_ENGINE} "
75+
76+ export LIB_FUZZING_ENGINE=" ${LIB_FUZZING_ENGINE} -Wl,--start-group ${TARGET_DIR} /lib/libgit2.a"
You can’t perform that action at this time.
0 commit comments