From 8e9c7f716acbecd107280abb07fee2b8601afc2c Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 24 Mar 2022 15:26:40 -0700 Subject: [PATCH] [Bazel] Add BLAKE3 files to llvm:Support Hope someone can figure out how to leverage SSE42/AVE2/Arm Neon. --- utils/bazel/llvm-project-overlay/llvm/BUILD.bazel | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel b/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel index ddff246..9875c8d 100644 --- a/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel @@ -185,7 +185,12 @@ cc_library( "lib/Support/Unix/*.h", "lib/Support/Unix/*.inc", ]), - }), + }) + [ + "lib/Support/BLAKE3/blake3_impl.h", + "lib/Support/BLAKE3/blake3.c", + "lib/Support/BLAKE3/blake3_dispatch.c", + "lib/Support/BLAKE3/blake3_portable.c", + ], hdrs = glob([ "include/llvm/Support/**/*.h", "include/llvm/ADT/*.h", @@ -199,11 +204,19 @@ cc_library( "include/llvm-c/ExternC.h", "include/llvm-c/Support.h", "include/llvm-c/Types.h", + "include/llvm-c/blake3.h", "include/llvm/ExecutionEngine/JITSymbol.h", "include/llvm/Support/Extension.def", "include/llvm/Support/VCSRevision.h", ], copts = llvm_copts, + defines = [ + "BLAKE3_NO_AVX2", + "BLAKE3_NO_AVX512", + "BLAKE3_NO_SSE2", + "BLAKE3_NO_SSE41", + "BLAKE3_USE_NEON=0", + ], includes = ["include"], linkopts = select({ "@bazel_tools//src/conditions:windows": [], -- 2.7.4