Skip to content

Commit

Permalink
Support portable build without intrinsics
Browse files Browse the repository at this point in the history
  • Loading branch information
wargio committed Oct 3, 2022
1 parent 7e15c53 commit cf5d59c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -233,3 +233,17 @@ jobs:
- name: build b3sum
run: cargo build --target aarch64-apple-darwin
working-directory: ./b3sum

build_tinycc:
name: build with the Tiny C Compiler
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: install TCC
run: apt-get install -y tcc
- name: compile
run: >
tcc -shared -O3 -o libblake3.so \
-DBLAKE3_NO_SSE2 -DBLAKE3_NO_SSE41 -DBLAKE3_NO_AVX2 -DBLAKE3_NO_AVX512 \
blake3.c blake3_dispatch.c blake3_portable.c
working-directory: ./c
2 changes: 1 addition & 1 deletion c/blake3_dispatch.c
Expand Up @@ -10,7 +10,7 @@
#elif defined(__GNUC__)
#include <immintrin.h>
#else
#error "Unimplemented!"
#undef IS_X86 /* Unimplemented! */
#endif
#endif

Expand Down
1 change: 0 additions & 1 deletion c/blake3_impl.h
Expand Up @@ -46,7 +46,6 @@ enum blake3_flags {
#if defined(_MSC_VER)
#include <intrin.h>
#endif
#include <immintrin.h>
#endif

#if !defined(BLAKE3_USE_NEON)
Expand Down

0 comments on commit cf5d59c

Please sign in to comment.