Skip to content

Commit 4a49a79

Browse files
committed
Remove /lib from DYLD_FALLBACK_LIBRARY_PATH
While the manual page for dyld says the default used when DYLD_FALLBACK_LIBRARY_PATH is not set is $(HOME)/lib:/usr/local/lib:/lib:/usr/lib, its code actually says ``` sLibraryFallbackPaths[] = { "$HOME/lib", "/usr/local/lib", "/usr/lib", NULL }; ``` as far back as the first version of dyld released in OSX 10.4: https://opensource.apple.com/source/dyld/dyld-43/src/dyld.cpp.auto.html (and the manual page was wrong back then too https://opensource.apple.com/source/dyld/dyld-43/doc/man/man1/dyld.1.auto.html) It is better to avoid putting more paths than necessary in this variable.
1 parent 73ed6a5 commit 4a49a79

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/cargo/core/compiler/compilation.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ impl<'cfg> Compilation<'cfg> {
187187
search_path.push(PathBuf::from(home).join("lib"));
188188
}
189189
search_path.push(PathBuf::from("/usr/local/lib"));
190-
search_path.push(PathBuf::from("/lib"));
191190
search_path.push(PathBuf::from("/usr/lib"));
192191
}
193192
let search_path = join_paths(&search_path, util::dylib_path_envvar())?;

0 commit comments

Comments
 (0)