about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--crates/proc_macro_srv/src/dylib.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/proc_macro_srv/src/dylib.rs b/crates/proc_macro_srv/src/dylib.rs
index ab13e66fb81..cc0b816a535 100644
--- a/crates/proc_macro_srv/src/dylib.rs
+++ b/crates/proc_macro_srv/src/dylib.rs
@@ -168,6 +168,10 @@ fn ensure_file_with_lock_free_access(path: &Path) -> io::Result<PathBuf> {
     use std::ffi::OsString;
     use std::hash::{BuildHasher, Hasher};
 
+    if std::env::var("RA_DONT_COPY_PROC_MACRO_DLL").is_ok() {
+        return Ok(path.to_path_buf());
+    }
+
     let mut to = std::env::temp_dir();
 
     let file_name = path.file_name().ok_or_else(|| {