File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,18 @@ pub fn dylib_path_envvar() -> &'static str {
34
34
if cfg ! ( windows) {
35
35
"PATH"
36
36
} else if cfg ! ( target_os = "macos" ) {
37
- "DYLD_LIBRARY_PATH"
37
+ // When loading and linking a dynamic library or bundle, dlopen
38
+ // searches in LD_LIBRARY_PATH, DYLD_LIBRARY_PATH, PWD, and
39
+ // DYLD_FALLBACK_LIBRARY_PATH.
40
+ // In the Mach-O format, a dynamic library has an "install path."
41
+ // Clients linking against the library record this path, and the
42
+ // dynamic linker, dyld, uses it to locate the library.
43
+ // dyld searches DYLD_LIBRARY_PATH *before* the install path.
44
+ // dyld searches DYLD_FALLBACK_LIBRARY_PATH only if it cannot
45
+ // find the library in the install path.
46
+ // Setting DYLD_LIBRARY_PATH can easily have unintended
47
+ // consequences.
48
+ "DYLD_FALLBACK_LIBRARY_PATH"
38
49
} else {
39
50
"LD_LIBRARY_PATH"
40
51
}
You can’t perform that action at this time.
0 commit comments