Skip to content

Commit

Permalink
Add linkage attributes to extern "C" blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
saethlin committed Oct 4, 2024
1 parent 27cbd6b commit 8f97739
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ffi_avx2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ pub unsafe fn hash_many<const N: usize>(
}

pub mod ffi {
#[link(name = "blake3_sse2_sse41_avx2_assembly", kind = "static")]
extern "C" {
pub fn blake3_hash_many_avx2(
inputs: *const *const u8,
Expand Down
1 change: 1 addition & 0 deletions src/ffi_avx512.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ pub unsafe fn hash_many<const N: usize>(
}

pub mod ffi {
#[link(name = "blake3_avx512_assembly", kind = "static")]
extern "C" {
pub fn blake3_compress_in_place_avx512(
cv: *mut u32,
Expand Down
1 change: 1 addition & 0 deletions src/ffi_neon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ pub extern "C" fn blake3_compress_in_place_portable(
}

pub mod ffi {
#[link(name = "blake3_neon", kind = "static")]
extern "C" {
pub fn blake3_hash_many_neon(
inputs: *const *const u8,
Expand Down
1 change: 1 addition & 0 deletions src/ffi_sse2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ pub unsafe fn hash_many<const N: usize>(
}

pub mod ffi {
#[link(name = "blake3_sse2_sse41_avx2_assembly", kind = "static")]
extern "C" {
pub fn blake3_compress_in_place_sse2(
cv: *mut u32,
Expand Down
1 change: 1 addition & 0 deletions src/ffi_sse41.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ pub unsafe fn hash_many<const N: usize>(
}

pub mod ffi {
#[link(name = "blake3_sse2_sse41_avx2_assembly", kind = "static")]
extern "C" {
pub fn blake3_compress_in_place_sse41(
cv: *mut u32,
Expand Down

0 comments on commit 8f97739

Please sign in to comment.