Skip to content

Commit

Permalink
override CC and CXX when precompiling with manylinux2014
Browse files Browse the repository at this point in the history
  • Loading branch information
cocoa-xu committed Nov 21, 2023
1 parent c8d2231 commit 2070510
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/precompile-manylinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ jobs:
MIX_ENV: prod
OPENSSL_VERSION: "3.1.1"
ELIXIR_VERSION: "v1.15.4"
HNSWLIB_CI_PRECOMPILE: "manylinux2014"
strategy:
matrix:
otp_version: ["25.3.2.6", "26.0.2"]
arch: [x86_64, i686]
arch: [x86_64, i686, s390x]

name: ${{ matrix.arch }}-linux-gnu - OTP ${{ matrix.otp_version }}

Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/precompile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ jobs:
gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \
gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf \
gcc-riscv64-linux-gnu g++-riscv64-linux-gnu \
gcc-powerpc64le-linux-gnu g++-powerpc64le-linux-gnu \
gcc-s390x-linux-gnu g++-s390x-linux-gnu
gcc-powerpc64le-linux-gnu g++-powerpc64le-linux-gnu
- name: Precompile
run: |
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ ifdef CMAKE_TOOLCHAIN_FILE
CMAKE_CONFIGURE_FLAGS=-D CMAKE_TOOLCHAIN_FILE="$(CMAKE_TOOLCHAIN_FILE)"
endif

ifeq (${HNSWLIB_CI_PRECOMPILE}, manylinux2014)
CC=gcc
CXX=g++
endif

CMAKE_BUILD_TYPE ?= Release
DEFAULT_JOBS ?= 1
CMAKE_HNSWLIB_BUILD_DIR = $(MIX_APP_PATH)/cmake_hnswlib
Expand Down

0 comments on commit 2070510

Please sign in to comment.