Skip to content

release/21.x: [Support/BLAKE3] quick fix for Cygwin build (#148635)#149408

Merged
tru merged 1 commit into
llvm:release/21.xfrom
llvmbot:issue148635
Jul 22, 2025
Merged

release/21.x: [Support/BLAKE3] quick fix for Cygwin build (#148635)#149408
tru merged 1 commit into
llvm:release/21.xfrom
llvmbot:issue148635

Conversation

@llvmbot

@llvmbot llvmbot commented Jul 17, 2025

Copy link
Copy Markdown
Member

Backport 8de61eb

Requested by: @mstorsjo

@llvmbot

llvmbot commented Jul 17, 2025

Copy link
Copy Markdown
Member Author

@Meinersbur What do you think about merging this PR to the release branch?

@llvmbot

llvmbot commented Jul 17, 2025

Copy link
Copy Markdown
Member Author

@llvm/pr-subscribers-llvm-support

Author: None (llvmbot)

Changes

Backport 8de61eb

Requested by: @mstorsjo


Full diff: https://github.com/llvm/llvm-project/pull/149408.diff

2 Files Affected:

  • (modified) llvm/lib/Support/BLAKE3/blake3_dispatch.c (+1-1)
  • (modified) llvm/lib/Support/BLAKE3/blake3_impl.h (+1-1)
diff --git a/llvm/lib/Support/BLAKE3/blake3_dispatch.c b/llvm/lib/Support/BLAKE3/blake3_dispatch.c
index d00580fe35195..19918aa708b2f 100644
--- a/llvm/lib/Support/BLAKE3/blake3_dispatch.c
+++ b/llvm/lib/Support/BLAKE3/blake3_dispatch.c
@@ -236,7 +236,7 @@ void blake3_xof_many(const uint32_t cv[8],
 #if defined(IS_X86)
   const enum cpu_feature features = get_cpu_features();
   MAYBE_UNUSED(features);
-#if !defined(_WIN32) && !defined(BLAKE3_NO_AVX512)
+#if !defined(_WIN32) && !defined(__CYGWIN__) && !defined(BLAKE3_NO_AVX512)
   if (features & AVX512VL) {
     blake3_xof_many_avx512(cv, block, block_len, counter, flags, out, outblocks);
     return;
diff --git a/llvm/lib/Support/BLAKE3/blake3_impl.h b/llvm/lib/Support/BLAKE3/blake3_impl.h
index deed079e468a5..dd71e729f208f 100644
--- a/llvm/lib/Support/BLAKE3/blake3_impl.h
+++ b/llvm/lib/Support/BLAKE3/blake3_impl.h
@@ -324,7 +324,7 @@ void blake3_hash_many_avx512(const uint8_t *const *inputs, size_t num_inputs,
                              uint8_t flags, uint8_t flags_start,
                              uint8_t flags_end, uint8_t *out);
 
-#if !defined(_WIN32)
+#if !defined(_WIN32) && !defined(__CYGWIN__)
 LLVM_LIBRARY_VISIBILITY
 void blake3_xof_many_avx512(const uint32_t cv[8],
                             const uint8_t block[BLAKE3_BLOCK_LEN],

@github-project-automation github-project-automation Bot moved this from Needs Triage to Needs Merge in LLVM Release Status Jul 21, 2025
BLAKE3 1.8.2 ( imported in d2ad63a )
fails to build for the Cygwin target.

see: BLAKE3-team/BLAKE3#494

As a temporary workaround, add `&& !defined(__CYGWIN__)` to BLAKE3
locally.

resolves llvm#148365

(cherry picked from commit 8de61eb)
@tru tru merged commit e36a7da into llvm:release/21.x Jul 22, 2025
@github-project-automation github-project-automation Bot moved this from Needs Merge to Done in LLVM Release Status Jul 22, 2025
@github-actions

Copy link
Copy Markdown

@mstorsjo (or anyone else). If you would like to add a note about this fix in the release notes (completely optional). Please reply to this comment with a one or two sentence description of the fix. When you are done, please add the release:note label to this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

4 participants