Skip to content

Commit 5842d3e

Browse files
committed
Use symlinks instead of hard links
This avoids rustdoc-fake getting out of date when rustc-fake is updated.
1 parent a40c5a3 commit 5842d3e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

collector/src/bin/rustc-perf-collector/execute.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,12 @@ lazy_static::lazy_static! {
339339
fake_rustdoc.push("rustdoc-fake");
340340
// link from rustc-fake to rustdoc-fake
341341
if !fake_rustdoc.exists() {
342-
std::fs::hard_link(&*FAKE_RUSTC, &fake_rustdoc).expect("failed to make hard link");
342+
#[cfg(unix)]
343+
use std::os::unix::fs::symlink;
344+
#[cfg(windows)]
345+
use std::os::windows::fs::symlink_file as symlink;
346+
347+
symlink(&*FAKE_RUSTC, &fake_rustdoc).expect("failed to make symbolic link");
343348
}
344349
fake_rustdoc
345350
};

0 commit comments

Comments
 (0)