Skip to content

Commit 03b326d

Browse files
Use RTLD_DEEPBIND for loading dylibs/proc-macros
1 parent a835b48 commit 03b326d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/rustc_metadata/src/dynamic_lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ mod dl {
9999
let s = CString::new(filename.as_bytes()).unwrap();
100100

101101
let mut dlerror = error::lock();
102-
let ret = unsafe { libc::dlopen(s.as_ptr(), libc::RTLD_LAZY | libc::RTLD_LOCAL) };
102+
let ret = unsafe {
103+
libc::dlopen(s.as_ptr(), libc::RTLD_LAZY | libc::RTLD_LOCAL | libc::RTLD_DEEPBIND)
104+
};
103105

104106
if !ret.is_null() {
105107
return Ok(ret.cast());

0 commit comments

Comments
 (0)