Skip to content

Commit

Permalink
build: 📦 add aarch64 support
Browse files Browse the repository at this point in the history
  • Loading branch information
darvid committed Jan 28, 2024
1 parent 5c754d0 commit 1e3cb40
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
fail-fast: false
matrix:
policy: ["manylinux2014", "manylinux_2_28", "musllinux_1_1"]
platform: ["x86_64"]
platform: ["x86_64", "aarch64"]
env:
POLICY: ${{ matrix.policy }}
PLATFORM: ${{ matrix.platform }}
Expand Down
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,16 @@ RUN cp -r .libs /opt/pcre/
WORKDIR /tmp/vectorscan

FROM build_pcre AS build_vectorscan
ARG POLICY
ARG PLATFORM
ARG build_type
ARG pcre_version
RUN mkdir -p build
WORKDIR /tmp/vectorscan/build
ENV CFLAGS="-fPIC"
RUN [[ "$POLICY" == 'musllinux_1_1' ]] && \
export CFLAGS="$CFLAGS -march=core2"; \
RUN if [[ "$POLICY" == 'musllinux_1_1' ]]; then \
[[ "$PLATFORM" == 'aarch64' ]] && export CFLAGS="$CFLAGS -march=armv8-a" \
|| export CFLAGS="$CFLAGS -march=core2"; fi; \
export CXXFLAGS="$CFLAGS -D_GLIBCXX_USE_CXX11_ABI=0"; \
cmake \
-DCMAKE_INSTALL_PREFIX=/opt/vectorscan \
Expand Down

0 comments on commit 1e3cb40

Please sign in to comment.