aboutsummaryrefslogtreecommitdiff
path: root/build.rs
diff options
context:
space:
mode:
authorJack O'Connor <[email protected]>2019-12-10 14:20:09 -0500
committerJack O'Connor <[email protected]>2019-12-11 18:05:26 -0500
commit52ea6487f88a0e5cbc2f784f3095539afe6c91e4 (patch)
tree181508c1840c2961e530e982c4525029d79e5685 /build.rs
parentd68882da0d897c93a271a7c0f6d6b9b13d13aa16 (diff)
switch to representing CVs as words for the compression function
The portable implementation was getting slowed down by converting back and forth between words and bytes. I made the corresponding change on the C side first (https://github.com/veorq/BLAKE3-c/commit/12a37be8b50922a358c016ba07f46816a3da4a31), and as part of this commit I'm re-vendoring the C code. I'm also exposing a small FFI interface to C so that blake3_neon.c can link against portable.rs rather than blake3_portable.c, see c_neon.rs.
Diffstat (limited to 'build.rs')
-rw-r--r--build.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/build.rs b/build.rs
index e45d813..f85959e 100644
--- a/build.rs
+++ b/build.rs
@@ -44,8 +44,10 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
if defined("CARGO_FEATURE_C_NEON") {
let mut build = new_build();
+ // Note that blake3_neon.c normally depends on the blake3_portable.c
+ // for the single-instance compression function, but we expose
+ // portable.rs over FFI instead. See c_neon.rs.
build.file("src/c/blake3_neon.c");
- build.file("src/c/blake3_portable.c");
// ARMv7 platforms that support NEON generally need the following
// flags. AArch64 supports NEON by default and does not support -mpfu.
if is_armv7() {