diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-02-10 15:28:49 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-10 15:28:49 +0100 |
| commit | 08ce17affc351e788beb09b141ae4b2ac355ffca (patch) | |
| tree | 89a6e205eecd54ae551bf110edcbf0e624fc1899 | |
| parent | a4c64b9c0e24e2436a5cc0a75ab65d2738a73bab (diff) | |
| parent | d560574c4bd621cfabaa413c79e76b1da1abf279 (diff) | |
| download | rust-08ce17affc351e788beb09b141ae4b2ac355ffca.tar.gz rust-08ce17affc351e788beb09b141ae4b2ac355ffca.zip | |
Rollup merge of #107876 - zephaniahong:issue-107547-fix, r=albertlarsan68
create symlink only for non-windows operating systems Follow up on #107834 It's my first time using the #cfg attribute. Did I use it correctly? Thank you!
| -rw-r--r-- | src/bootstrap/download.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/bootstrap/download.rs b/src/bootstrap/download.rs index b9db9f12cdf..6dcba117c24 100644 --- a/src/bootstrap/download.rs +++ b/src/bootstrap/download.rs @@ -340,9 +340,12 @@ impl Config { let rustfmt_path = bin_root.join("bin").join(exe("rustfmt", host)); let rustfmt_stamp = bin_root.join(".rustfmt-stamp"); - let legacy_rustfmt = self.initial_rustc.with_file_name(exe("rustfmt", host)); - if !legacy_rustfmt.exists() { - t!(self.symlink_file(&rustfmt_path, &legacy_rustfmt)); + #[cfg(not(windows))] + { + let legacy_rustfmt = self.initial_rustc.with_file_name(exe("rustfmt", host)); + if !legacy_rustfmt.exists() { + t!(self.symlink_file(&rustfmt_path, &legacy_rustfmt)); + } } if rustfmt_path.exists() && !program_out_of_date(&rustfmt_stamp, &channel) { |
