-
Notifications
You must be signed in to change notification settings - Fork 13.5k
mk: Fix MSVC bootstrapping itself #25848
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
Conversation
Now that MSVC support has landed in the most recent nightlies we can now have MSVC bootstrap itself without going through a GNU compiler first. Unfortunately, however, the bootstrap currently fails due to the compiler not being able to find the llvm-ar.exe tool during the stage0 libcore compile. The compiler cannot find this tool because it's looking inside a directory that does not exist: $SYSROOT/rustlib/x86_64-pc-windows-gnu/bin The `gnu` on this triple is because the bootstrap compiler's host architecture is GNU. The build system, however, only arranges for the llvm-ar.exe tool to be available in this location: $SYSROOT/rustlib/x86_64-pc-windows-msvc/bin To resolve this discrepancy, the build system has been modified to understand triples that are bootstrapped from another triple, and in this case copy the native tools to the right location.
r? @pcwalton (rust_highfive has picked a reviewer for you, use r? to override) |
r? @brson |
I have confirmed in dev that this is able to bootstrap itself! |
Confirmed on my system as well. |
@bors r+ |
📌 Commit b8c5921 has been approved by |
Now that MSVC support has landed in the most recent nightlies we can now have MSVC bootstrap itself without going through a GNU compiler first. Unfortunately, however, the bootstrap currently fails due to the compiler not being able to find the llvm-ar.exe tool during the stage0 libcore compile. The compiler cannot find this tool because it's looking inside a directory that does not exist: $SYSROOT/rustlib/x86_64-pc-windows-gnu/bin The `gnu` on this triple is because the bootstrap compiler's host architecture is GNU. The build system, however, only arranges for the llvm-ar.exe tool to be available in this location: $SYSROOT/rustlib/x86_64-pc-windows-msvc/bin To resolve this discrepancy, the build system has been modified to understand triples that are bootstrapped from another triple, and in this case copy the native tools to the right location.
I am wondering if the right solution for this problem wouldn't be replacing |
That was actually my original thought as well, but after some discussion with @brson we concluded that it would probably make the most sense to not assume that the host can run the target binaries (because it's not true in most situations). I think in the long term we want the tools we provide (in |
Shouldn't they live in |
That has the unfortunate side effect of being installed-by-default for the entire system, which isn't perhaps always desired. For example I would be somewhat uncomfortable distributing We could perhaps but |
Now that MSVC support has landed in the most recent nightlies we can now have
MSVC bootstrap itself without going through a GNU compiler first. Unfortunately,
however, the bootstrap currently fails due to the compiler not being able to
find the llvm-ar.exe tool during the stage0 libcore compile. The compiler cannot
find this tool because it's looking inside a directory that does not exist:
The
gnu
on this triple is because the bootstrap compiler's host architectureis GNU. The build system, however, only arranges for the llvm-ar.exe tool to be
available in this location:
To resolve this discrepancy, the build system has been modified to understand
triples that are bootstrapped from another triple, and in this case copy the
native tools to the right location.