Rollup merge of #77950 - arlosi:sha256, r=eddyb
Add support for SHA256 source file hashing Adds support for `-Z src-hash-algorithm sha256`, which became available in LLVM 11. Using an older version of LLVM will cause an error `invalid checksum kind` if the hash algorithm is set to sha256. r? `@eddyb` cc #70401 `@est31`
This commit is contained in:
commit
52405f7c0c
10 changed files with 59 additions and 10 deletions
|
@ -801,6 +801,7 @@ fn file_metadata_raw(
|
|||
let kind = match hash.kind {
|
||||
rustc_span::SourceFileHashAlgorithm::Md5 => llvm::ChecksumKind::MD5,
|
||||
rustc_span::SourceFileHashAlgorithm::Sha1 => llvm::ChecksumKind::SHA1,
|
||||
rustc_span::SourceFileHashAlgorithm::Sha256 => llvm::ChecksumKind::SHA256,
|
||||
};
|
||||
(kind, hex_encode(hash.hash_bytes()))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue