diff options
author | Nikias Bassen | 2021-09-13 23:27:55 +0200 |
---|---|---|
committer | Nikias Bassen | 2021-09-13 23:27:55 +0200 |
commit | 3a10a315a59ff73fe2edfb3dca897ab688407b71 (patch) | |
tree | 5e7113df1f17bd0e9ab96df680f92a4e413a88cc /.github/workflows | |
parent | d64a7a34166a470e6fa93a9f93e49c6ab23a7e62 (diff) | |
download | libimobiledevice-3a10a315a59ff73fe2edfb3dca897ab688407b71.tar.gz libimobiledevice-3a10a315a59ff73fe2edfb3dca897ab688407b71.tar.bz2 |
[github-actions] macOS: build for arm64 too
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/build.yml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 30b6b9b..d5c9c0c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -119,6 +119,16 @@ jobs: echo "DEPSDIR=`pwd`/deps" >> $GITHUB_ENV - name: autogen run: | + SDKDIR=`xcrun --sdk macosx --show-sdk-path` + TESTARCHS="arm64 x86_64" + USEARCHS= + for ARCH in $TESTARCHS; do + if echo "int main(int argc, char **argv) { return 0; }" |clang -arch $ARCH -o /dev/null -isysroot $SDKDIR -x c - 2>/dev/null; then + USEARCHS="$USEARCHS -arch $ARCH" + fi + done + export CFLAGS="$USEARCHS -isysroot $SDKDIR" + echo "Using CFLAGS: $CFLAGS" ./autogen.sh PKG_CONFIG_PATH=/usr/local/lib/pkgconfig --enable-debug \ openssl_CFLAGS="-I${{ env.DEPSDIR }}/libressl-${{ env.LIBRESSL_VER }}/include" \ openssl_LIBS="-Xlinker ${{ env.LIBSSL }} -Xlinker ${{ env.LIBCRYPTO }}" |