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

Ignore the host in rustc.verbose_version for metadata #7873

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/cargo/core/compiler/context/compilation_files.rs
Expand Up @@ -572,7 +572,13 @@ fn compute_metadata<'a, 'cfg>(
unit.target.name().hash(&mut hasher);
unit.target.kind().hash(&mut hasher);

bcx.rustc.verbose_version.hash(&mut hasher);
// Throw in the verbose rustc version output. Cross-compiling the same target from different
// hosts should still produce the same output, so filter out the host triple.
for line in bcx.rustc.verbose_version.lines() {
if !line.starts_with("host:") {
line.hash(&mut hasher);
}
}

if cx.is_primary_package(unit) {
// This is primarily here for clippy. This ensures that the clippy
Expand Down