-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Use SHA256 source file checksums by default when targeting MSVC #113707
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @fee1-dead (or someone else) soon. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
why does this use a different hash algorithm on windows? sha256 seems fine - shouldn't we use that for all platforms? |
I don't know. Maybe the debuggers on non- Windows platforms don't all support SHA256 yet. |
r? compiler |
The DWARF 5 spec only has support for MD5 (section 6.2.4.1 or search for |
@bors r+ |
…eholk Use SHA256 source file checksums by default when targeting MSVC Currently, when targeting Windows (more specifically, the MSVC toolchain), Rust will use SHA1 source file checksums by default. SHA1 has been superseded by SHA256, and Microsoft recommends migrating to SHA256. As of Visual Studio 2022, MSVC defaults to SHA256. This change aligns Rust and MSVC. LLVM can already use SHA256 checksums, so this does not require any change to LLVM. MSVC docs on source file checksums: https://learn.microsoft.com/en-us/cpp/build/reference/zh?view=msvc-170
⌛ Testing commit fcdff63 with merge 0642dbf7103f39f6144730c05954af88958e3889... |
Bors seems to have forgotten about this? @bors r=eholk |
💡 This pull request was already approved, no need to approve it again.
|
☀️ Test successful - checks-actions |
Finished benchmarking commit (5419aa3): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 651.312s -> 651.291s (-0.00%) |
Currently, when targeting Windows (more specifically, the MSVC toolchain), Rust will use SHA1 source file checksums by default. SHA1 has been superseded by SHA256, and Microsoft recommends migrating to SHA256.
As of Visual Studio 2022, MSVC defaults to SHA256. This change aligns Rust and MSVC.
LLVM can already use SHA256 checksums, so this does not require any change to LLVM.
MSVC docs on source file checksums: https://learn.microsoft.com/en-us/cpp/build/reference/zh?view=msvc-170