Commit 04d87b6 Paulo Gomes
authored
File tree 2 files changed +17
-2
lines changed
2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -20,10 +20,14 @@ set -euxo pipefail
20
20
# Use it for unsetting any environment variables that may impact other building
21
21
# processes.
22
22
23
+ if [[ -n " ${PRE_LIB_FUZZING_ENGINE} " ]]; then
24
+ export LIB_FUZZING_ENGINE=" ${PRE_LIB_FUZZING_ENGINE} "
25
+ fi
26
+
23
27
unset TARGET_DIR
24
28
unset CGO_ENABLED
25
29
unset LIBRARY_PATH
26
30
unset PKG_CONFIG_PATH
27
31
unset CGO_CFLAGS
28
32
unset 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"
62
62
export CGO_CFLAGS=" -I${TARGET_DIR} /include"
63
63
export CGO_LDFLAGS=" $( pkg-config --libs --static --cflags libgit2) "
64
64
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