From 2ae92376b741e202ebc2ef91b0d08f20e0db780a Mon Sep 17 00:00:00 2001 From: divinity76 Date: Sat, 16 Mar 2024 15:03:11 +0100 Subject: [PATCH] BLAKE3_FORCE_PORTABLE simple flag to only compile the portable implementation got the idea from https://github.com/BLAKE3-team/BLAKE3/issues/364#issuecomment-2001979018 could name it BLAKE3_PORTABLE instead, maybe, idk --- c/blake3_impl.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/c/blake3_impl.h b/c/blake3_impl.h index beab5cf53..651b345b8 100644 --- a/c/blake3_impl.h +++ b/c/blake3_impl.h @@ -20,6 +20,14 @@ enum blake3_flags { DERIVE_KEY_MATERIAL = 1 << 6, }; +#ifdef BLAKE3_FORCE_PORTABLE +#define BLAKE3_NO_SSE2 +#define BLAKE3_NO_SSE41 +#define BLAKE3_NO_AVX2 +#define BLAKE3_NO_AVX512 +#define BLAKE3_USE_NEON 0 +#endif + // This C implementation tries to support recent versions of GCC, Clang, and // MSVC. #if defined(_MSC_VER)