Merge pull request #2002 from seanm/issue2001

issue #2001: fix passing rpath to linker on macOS
This commit is contained in:
van Hauser 2024-02-16 10:14:56 +01:00 committed by GitHub
commit ebdb71aeb0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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);
}