Skip to content

Commit 8e9c7f7

Browse files
committed
[Bazel] Add BLAKE3 files to llvm:Support
Hope someone can figure out how to leverage SSE42/AVE2/Arm Neon.
1 parent df209b8 commit 8e9c7f7

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

utils/bazel/llvm-project-overlay/llvm/BUILD.bazel

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,12 @@ cc_library(
185185
"lib/Support/Unix/*.h",
186186
"lib/Support/Unix/*.inc",
187187
]),
188-
}),
188+
}) + [
189+
"lib/Support/BLAKE3/blake3_impl.h",
190+
"lib/Support/BLAKE3/blake3.c",
191+
"lib/Support/BLAKE3/blake3_dispatch.c",
192+
"lib/Support/BLAKE3/blake3_portable.c",
193+
],
189194
hdrs = glob([
190195
"include/llvm/Support/**/*.h",
191196
"include/llvm/ADT/*.h",
@@ -199,11 +204,19 @@ cc_library(
199204
"include/llvm-c/ExternC.h",
200205
"include/llvm-c/Support.h",
201206
"include/llvm-c/Types.h",
207+
"include/llvm-c/blake3.h",
202208
"include/llvm/ExecutionEngine/JITSymbol.h",
203209
"include/llvm/Support/Extension.def",
204210
"include/llvm/Support/VCSRevision.h",
205211
],
206212
copts = llvm_copts,
213+
defines = [
214+
"BLAKE3_NO_AVX2",
215+
"BLAKE3_NO_AVX512",
216+
"BLAKE3_NO_SSE2",
217+
"BLAKE3_NO_SSE41",
218+
"BLAKE3_USE_NEON=0",
219+
],
207220
includes = ["include"],
208221
linkopts = select({
209222
"@bazel_tools//src/conditions:windows": [],

0 commit comments

Comments
 (0)