about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2020-11-03 19:32:26 +0100
committerGitHub <noreply@github.com>2020-11-03 19:32:26 +0100
commit52405f7c0cc3e8cc52293ea19b78da88eb79af2d (patch)
tree9278e073fba56162eb4f1cfe06cf1763ddcc2e83 /src/test/codegen/src-hash-algorithm
parent0cd1516696550e108863bf4b4fb81ce5c4f58968 (diff)
parent3296d5ca7b41154359eaec76d9f77310816c9913 (diff)
downloadrust-52405f7c0cc3e8cc52293ea19b78da88eb79af2d.tar.gz
rust-52405f7c0cc3e8cc52293ea19b78da88eb79af2d.zip
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`
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
-rw-r--r--src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs b/src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs
new file mode 100644
index 00000000000..eaa9eafa1e8
--- /dev/null
+++ b/src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs
@@ -0,0 +1,7 @@
+// compile-flags: -g -Z src-hash-algorithm=sha256
+// min-llvm-version: 11.0
+
+#![crate_type = "lib"]
+
+pub fn test() {}
+// CHECK: checksumkind: CSK_SHA256