Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bootstrap: create directory junction target if it does not exist #109574

Closed
wants to merge 1 commit into from

Conversation

arlosi
Copy link
Contributor

@arlosi arlosi commented Mar 24, 2023

#104854 added the creation of a build/host symlink that points to the build/<host_triple> directory. However, the target directory might not exist, which causes a panic on Windows.

The directory is normally created when downloading the bootstrap tools, but if the user manually configures build.rustc and build.cargo on a clean Windows environment then the build will fail with the panic symlink_dir(..) failed with .. because the target directory hasn't been created yet.

This fixes the issue by creating the directory junction target if it does not exist. It's not an issue on non-Windows platforms, because they use symlinks instead of junctions which are allowed to point to non-existent entities (and it will be created later).

r? @wesleywiser

the `build/<host_triple>` directory. However, this directory
does not always exist.

The directory is normally created when downloading the bootstrap tools,
but if the user manually configures `build.rustc` and `build.cargo` then
the build will fail.

This fixes the issue be creating the directory junction target if it
does not exist. It's not an issue on non-Windows platforms,
because they use symlinks (which are allowed to point to non-existent
entities).
@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 Mar 24, 2023
@arlosi arlosi added the regression-from-stable-to-stable Performance or correctness regression from one stable version to another. label Mar 24, 2023
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Mar 24, 2023
@arlosi arlosi removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Mar 24, 2023
@arlosi
Copy link
Contributor Author

arlosi commented Mar 24, 2023

This looks like it's a duplicate of #109111, so it's already fixed in a different way.

@arlosi arlosi closed this Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression-from-stable-to-stable Performance or correctness regression from one stable version to another. 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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants