-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add BLAKE3 source code to third_party #18682
Conversation
third_party/blake3/BUILD
Outdated
"//src/conditions:darwin_arm64": [ | ||
"src/c/blake3_neon.c", | ||
], | ||
"//conditions:default": [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with BLAKE3's source code. Are these assembly code optional so that when targeting other platforms the code can still be compiled but is just slower? I guess the copts
below answers my question but just want to double check.
cc @meteorcloudy for potential caring when targeting other platforms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you got it. The blake3_portable.c implementation is a safe fallback for architectures which do not support the vectorized ASM implementations.
I strongly recommend to introduce new external dependencies as external repositories instead of checking in the |
@meteorcloudy Do we have docs/examples on how to do that? |
Yes, you can add a dependency in https://github.com/bazelbuild/bazel/blob/master/distdir_deps.bzl#L120 and put a Line 326 in e382abf
Also, it'll be nice this could be submit to the BCR so that it's also available in Bzlmod. |
@tylerwilliams Mind looking at what Yun suggested? |
Done. I will send a separate CL to BCR to add this over there as well (but don't want to block the rest of the changes). |
@meteorcloudy I sent that CL here: bazelbuild/bazel-central-registry#698 |
@sgowroji You can import the third_party change first, then the non-third_party change. I think the import scripts will work without having to split this PR. |
Hi @tylerwilliams, Could you please squash the commits in to one, So that i can initiate the import. Thanks! |
@sgowroji Sure, done! |
Partial commit for third_party/*, see #18682. Signed-off-by: Sunil Gowroji <sgowroji@google.com>
Third party changes merged at 0ff4f6d |
Partial commit for third_party/*, see bazelbuild#18682. Signed-off-by: Sunil Gowroji <sgowroji@google.com> (cherry picked from commit 0ff4f6d)
Add BLAKE3 source code to third_party This PR adds the BLAKE3 C and asm sources to third_party, and includes a BUILD file to build them. This is a partial commit for bazelbuild#18658. Closes bazelbuild#18682. PiperOrigin-RevId: 541539341 Change-Id: I49b1edce20a7d0f986e29712e6050e4e0b9c1d44 (cherry picked from commit a3a569e)
The changes in this PR have been included in Bazel 6.4.0 RC1. Please test out the release candidate and report any issues as soon as possible. If you're using Bazelisk, you can point to the latest RC by setting USE_BAZEL_VERSION=last_rc. |
Add BLAKE3 source code to third_party
This PR adds the BLAKE3 C and asm sources to third_party, and includes a BUILD
file to build them.
This is a partial commit for #18658.