File: blake3-skip-embedded-C-code-use-pure-implementation.patch

package info (click to toggle)
rustc 1.88.0%2Bdfsg1-2~bpo13%2B1
  • links: PTS, VCS
  • area: main
  • in suites: trixie-backports
  • size: 934,248 kB
  • sloc: xml: 158,127; python: 36,062; javascript: 19,855; sh: 19,700; cpp: 18,947; ansic: 12,993; asm: 4,792; makefile: 690; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (51 lines) | stat: -rw-r--r-- 1,676 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From: =?utf-8?q?Fabian_Gr=C3=BCnbichler?= <git@fabian.gruenbichler.email>
Date: Sat, 30 Nov 2024 12:24:03 +0100
Subject: blake3: skip embedded C code, use pure implementation
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Forwarded: not-needed

Signed-off-by: Fabian Grünbichler <git@fabian.gruenbichler.email>
---
 vendor/blake3-1.8.2/Cargo.toml |  2 +-
 vendor/blake3-1.8.2/build.rs   | 12 +++++++-----
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/vendor/blake3-1.8.2/Cargo.toml b/vendor/blake3-1.8.2/Cargo.toml
index a57d459..ac0895e 100644
--- a/vendor/blake3-1.8.2/Cargo.toml
+++ b/vendor/blake3-1.8.2/Cargo.toml
@@ -38,7 +38,7 @@ features = [
 ]
 
 [features]
-default = ["std"]
+default = ["std", "pure"]
 digest = ["dep:digest"]
 mmap = [
     "std",
diff --git a/vendor/blake3-1.8.2/build.rs b/vendor/blake3-1.8.2/build.rs
index 01b692f..f38e0c2 100644
--- a/vendor/blake3-1.8.2/build.rs
+++ b/vendor/blake3-1.8.2/build.rs
@@ -369,11 +369,13 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
     println!("cargo:rerun-if-env-changed=CFLAGS");
 
     // Ditto for source files, though these shouldn't change as often.
-    for file in std::fs::read_dir("c")? {
-        println!(
-            "cargo:rerun-if-changed={}",
-            file?.path().to_str().expect("utf-8")
-        );
+    if !is_pure() {
+        for file in std::fs::read_dir("c")? {
+            println!(
+                "cargo:rerun-if-changed={}",
+                file?.path().to_str().expect("utf-8")
+            );
+        }
     }
 
     // When compiling with clang-cl for windows, it adds .asm files to the root