diff --git a/tests/fuzz/oss-fuzz-build.sh b/tests/fuzz/oss-fuzz-build.sh index 8594658106..c178d1bfaf 100644 --- a/tests/fuzz/oss-fuzz-build.sh +++ b/tests/fuzz/oss-fuzz-build.sh @@ -5,4 +5,13 @@ conan install . --build=missing --update -s build_type=Release -o curaengine:ena cmake --preset release -DWITH_TEST_FUZZ=ON cmake --build --preset release -j$(nproc) -cp build/Release/tests/fuzz/Fuzz* $OUT \ No newline at end of file +cp build/Release/tests/fuzz/Fuzz* $OUT + +mkdir -p $OUT/lib +# Move all dynamic deps into output directory. +find ~/.conan/data -name '*.so*' -exec cp {} $OUT/lib/ \; + +# Rewrite dynamic linker paths to point to output directory +for fuzzer in $OUT/Fuzz*; do + chrpath -r '$ORIGIN/lib' $fuzzer +done