hfuzz-cc: enable ld's -undefined dynamic_lookup under macosx
@@ -399,13 +399,15 @@ static int ldMode(int argc, char** argv) {
args[j++] = getLibHFNetDriverPath();
/* Pull modules defining the following symbols (if they exist) */
-#ifndef _HF_ARCH_DARWIN
+#ifdef _HF_ARCH_DARWIN
+ args[j++] = "-Wl,-undefined,dynamic_lookup";
+ args[j++] = "-Wl,-u,_LIBHFNETDRIVER_module_main",
+ args[j++] = "-Wl,-u,_LIBHFUZZ_module_instrument";
+ args[j++] = "-Wl,-u,_LIBHFUZZ_module_memorycmp";
+#else /* _HF_ARCH_DARWIN */
args[j++] = "-Wl,-u,LIBHFNETDRIVER_module_main",
args[j++] = "-Wl,-u,LIBHFUZZ_module_instrument";
args[j++] = "-Wl,-u,LIBHFUZZ_module_memorycmp";
-#else /* _HF_ARCH_DARWIN */
- args[j++] = "-Wl,-u,_LIBHFUZZ_module_instrument";
- args[j++] = "-Wl,-u,_LIBHFUZZ_module_memorycmp";
#endif /* _HF_ARCH_DARWIN */
/* Needed by the libhfcommon */
