issue #2001: fix passing rpath to linker on macOS

Seems on macOS, `ld` does not want an `=` when specifying `-rpath`.
This commit is contained in:
Sean McBride
2024-02-15 19:19:51 -05:00
parent 61ceef64b1
commit 6dc58750cf

View File

@ -2379,7 +2379,11 @@ void add_runtime(aflcc_state_t *aflcc) {
if (aflcc->plusplus_mode && strlen(libdir) && strncmp(libdir, "/usr", 4) &&
strncmp(libdir, "/lib", 4)) {
#ifdef __APPLE__
u8 *libdir_opt = strdup("-Wl,-rpath," LLVM_LIBDIR);
#else
u8 *libdir_opt = strdup("-Wl,-rpath=" LLVM_LIBDIR);
#endif
insert_param(aflcc, libdir_opt);
}