Skip to content

Commit

Permalink
Add a way to disable dll copying for users of proc_macro_srv library
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad20012 committed Jan 28, 2022
1 parent cd6521e commit e277d5d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/proc_macro_srv/src/dylib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(|| {
Expand Down

0 comments on commit e277d5d

Please sign in to comment.