Skip to content

Commit e277d5d

Browse files
committedJan 28, 2022
Add a way to disable dll copying for users of proc_macro_srv library
1 parent cd6521e commit e277d5d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎crates/proc_macro_srv/src/dylib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,10 @@ fn ensure_file_with_lock_free_access(path: &Path) -> io::Result<PathBuf> {
168168
use std::ffi::OsString;
169169
use std::hash::{BuildHasher, Hasher};
170170

171+
if std::env::var("RA_DONT_COPY_PROC_MACRO_DLL").is_ok() {
172+
return Ok(path.to_path_buf());
173+
}
174+
171175
let mut to = std::env::temp_dir();
172176

173177
let file_name = path.file_name().ok_or_else(|| {

0 commit comments

Comments
 (0)
Please sign in to comment.