Skip to content

Commit

Permalink
Add blake3 NEON instructions on linux arm64
Browse files Browse the repository at this point in the history
otherwise getting libunix_jni.so: undefined symbol: blake3_hash_many_neon

see d0de5e0

Closes #19384.

PiperOrigin-RevId: 562479599
Change-Id: I8f0ca6b68486f5ea8db698f3f99526eb1c0de8a8
  • Loading branch information
mauriciogg authored and copybara-github committed Sep 4, 2023
1 parent b02b5f7 commit 31812fe
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion third_party/blake3/blake3.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,18 @@ cc_library(
"c/blake3_sse2_x86-64_unix.S",
"c/blake3_sse41_x86-64_unix.S",
],
"@bazel_tools//src/conditions:linux_aarch64": [
"c/blake3_neon.c",
],
"@bazel_tools//src/conditions:windows_x64": [
"c/blake3_avx2_x86-64_windows_msvc.asm",
"c/blake3_avx512_x86-64_windows_msvc.asm",
"c/blake3_sse2_x86-64_windows_msvc.asm",
"c/blake3_sse41_x86-64_windows_msvc.asm",
],
"@bazel_tools//src/conditions:windows_arm64": [
"c/blake3_neon.c",
],
"@bazel_tools//src/conditions:darwin_arm64": [
"c/blake3_neon.c",
],
Expand All @@ -57,9 +63,12 @@ cc_library(
# lacking the headers to compile AVX512.
"-DBLAKE3_NO_AVX512",
],
"@bazel_tools//src/conditions:linux_aarch64": [
"-DBLAKE3_USE_NEON=1",
],
"@bazel_tools//src/conditions:windows_x64": [],
"@bazel_tools//src/conditions:windows_arm64": [
"-DBLAKE3_USE_NEON=0",
"-DBLAKE3_USE_NEON=1",
],
"@bazel_tools//src/conditions:darwin_arm64": [
"-DBLAKE3_USE_NEON=1",
Expand Down

0 comments on commit 31812fe

Please sign in to comment.