From 8540b64211208af993720fba68a0b28839764b08 Mon Sep 17 00:00:00 2001 From: lazymio Date: Wed, 6 Oct 2021 15:36:12 +0200 Subject: [PATCH] Force static linkage for fuzz executables --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e52e47e..9d98286a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1172,6 +1172,10 @@ if(UNICORN_FUZZ) target_link_libraries(fuzz_emu_${SUFFIX} ${SAMPLES_LIB} ) + # oss-fuzz requires statically linked executables. + target_link_options(fuzz_emu_${SUFFIX} PRIVATE + -static + ) endforeach() endif()