Skip to content

Use symlink_dir to create junctions on Windows instead of trying to use symbolic links in copy_link_internal#152433

Open
Zoxc wants to merge 1 commit intorust-lang:mainfrom
Zoxc:bootstrap-symlink
Open

Use symlink_dir to create junctions on Windows instead of trying to use symbolic links in copy_link_internal#152433
Zoxc wants to merge 1 commit intorust-lang:mainfrom
Zoxc:bootstrap-symlink

Conversation

@Zoxc
Copy link
Contributor

@Zoxc Zoxc commented Feb 10, 2026

Symbolic links require extra privileges on Windows, so this falls back to creating junctions in symlink_file when operating on a directory.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Feb 10, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 10, 2026

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: bootstrap
  • bootstrap expanded to 6 candidates
  • Random selection from Mark-Simulacrum, Zalathar, clubby789, jieyouxu

@rust-log-analyzer

This comment has been minimized.

@ChrisDenton
Copy link
Member

Junction points only work on directories, not files. A hard link or a file copy would be necessary if symlinks aren't available.

@Zoxc Zoxc force-pushed the bootstrap-symlink branch from 31820df to 6e0c9f5 Compare February 10, 2026 12:02
@Zoxc
Copy link
Contributor Author

Zoxc commented Feb 11, 2026

Well this seems to only be called to create junctions to directories (on Windows), otherwise I'd be seeing more privilege errors.

@ChrisDenton
Copy link
Member

So it sounds like symlink_dir should be being called and it's a bug that symlink_file is.

@Mark-Simulacrum
Copy link
Member

@rustbot author

I don't have much context on the details here (especially Windows) but generally speaking it seems plausible that this is a bug in the callsite?

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 14, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 14, 2026

Reminder, once the PR becomes ready for a review, use @rustbot ready.

… use symbolic links in `copy_link_internal`
@Zoxc Zoxc force-pushed the bootstrap-symlink branch from 6e0c9f5 to 4ce1afa Compare February 22, 2026 16:01
@rustbot
Copy link
Collaborator

rustbot commented Feb 22, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@Zoxc Zoxc changed the title Create junctions instead of trying to use symbolic links in symlink_file on Windows Use symlink_dir to create junctions on Windows instead of trying to use symbolic links in copy_link_internal Feb 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants