Skip to content

Commit 2003cf1

Browse files
committed
Fix linking of fuzz test on mac
`-all_load` forces all libraries on the linker command line to included which causes problems when linking libhfnetdriver which also contains a `LLVMFuzzerTestOneInput` symbol. With `-force_load` only the libhfuzz library is linked retaining all symbols.
1 parent 0d06566 commit 2003cf1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hfuzz_cc/hfuzz-cc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ static int ldMode(int argc, char** argv) {
576576
/* Ensure to link libhfuzz to the fuzz test executable*/
577577
if (isExecutableBuild(argc, argv)) {
578578
#if defined(_HF_ARCH_DARWIN)
579-
args[j++] = "-Wl,-all_load";
579+
args[j++] = "-Wl,-force_load";
580580
#else
581581
args[j++] = "-Wl,--whole-archive";
582582
#endif

0 commit comments

Comments
 (0)