mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-24 15:02:19 +00:00
65 lines
2.0 KiB
Diff
65 lines
2.0 KiB
Diff
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.5.5/Cargo.toml | 2 +-
|
|
vendor/blake3-1.5.5/build.rs | 18 ++++++++++++------
|
|
2 files changed, 13 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/vendor/blake3-1.5.5/Cargo.toml b/vendor/blake3-1.5.5/Cargo.toml
|
|
index b30c1fd..2744571 100644
|
|
--- a/vendor/blake3-1.5.5/Cargo.toml
|
|
+++ b/vendor/blake3-1.5.5/Cargo.toml
|
|
@@ -110,7 +110,7 @@ version = "3.8.0"
|
|
version = "1.1.12"
|
|
|
|
[features]
|
|
-default = ["std"]
|
|
+default = ["std", "pure"]
|
|
digest = ["dep:digest"]
|
|
mmap = [
|
|
"std",
|
|
diff --git a/vendor/blake3-1.5.5/build.rs b/vendor/blake3-1.5.5/build.rs
|
|
index 57f72b7..952b864 100644
|
|
--- a/vendor/blake3-1.5.5/build.rs
|
|
+++ b/vendor/blake3-1.5.5/build.rs
|
|
@@ -275,7 +275,11 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
}
|
|
|
|
if is_x86_64() || is_x86_32() {
|
|
- let support = c_compiler_support();
|
|
+ let support = if is_pure() {
|
|
+ NoCompiler
|
|
+ } else {
|
|
+ c_compiler_support()
|
|
+ };
|
|
if is_x86_32() || should_prefer_intrinsics() || is_pure() || support == NoCompiler {
|
|
build_sse2_sse41_avx2_rust_intrinsics();
|
|
} else {
|
|
@@ -312,11 +316,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")
|
|
+ );
|
|
+ }
|
|
}
|
|
|
|
Ok(())
|