Skip to content

Commit

Permalink
Support armv7l architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
akash-akya committed Mar 22, 2023
1 parent c243678 commit 0f56c5d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/precompile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ jobs:
- name: Install Dependencies
run: |
sudo apt-get update
# we don't need g++ compiler but we `cc_precompiler` looks for
# g++ executable to detect the target
sudo apt-get install -y gcc make curl tar \
gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
gcc-aarch64-linux-gnu gcc-arm-linux-gnueabihf
# install x86_64 musl cross-compiler
TARGET=x86_64-linux-musl-cross
Expand Down
3 changes: 3 additions & 0 deletions build_scripts/precompiler.exs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ defmodule Vix.LibvipsPrecompiled do
{"aarch64", "linux", "gnu"} ->
{:ok, "linux-arm64v8"}

{"armv7l", "linux", "gnueabihf"} ->
{:ok, "linux-armv7"}

{"x86_64", "apple", "darwin"} ->
{:ok, "darwin-x64"}

Expand Down
2 changes: 2 additions & 0 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ defmodule Vix.MixProject do
make_force_build: make_force_build(),
cc_precompiler: [
cleanup: "clean_precompiled_libvips",
allow_missing_compiler: true,
compilers: %{
{:unix, :linux} => %{
"x86_64-linux-gnu" => "x86_64-linux-gnu-",
"aarch64-linux-gnu" => "aarch64-linux-gnu-",
"armv7l-linux-gnueabihf" => "arm-linux-gnueabihf-",
"x86_64-linux-musl" => "x86_64-linux-musl-",
"aarch64-linux-musl" => "aarch64-linux-musl-"
},
Expand Down

0 comments on commit 0f56c5d

Please sign in to comment.