From ab6767e76a2013f01f5b28a3b79495934c7482d4 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Wed, 5 Feb 2025 10:28:20 +0100 Subject: [PATCH] Fix cross-compilation archiving step --- .github/workflows/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b3ba5615..f569d626 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -167,6 +167,9 @@ jobs: env: CC: ${{ matrix.CC }} CXX: ${{ matrix.CXX }} + - name: Install llvm tools (for llvm-ar) + if: startsWith(matrix.build, 'cross-macos') || startsWith(matrix.build, 'cross-ios') + run: sudo apt-get install llvm - name: Download macOS SDK if: startsWith(matrix.build, 'cross-macos') run: | @@ -182,9 +185,10 @@ jobs: - name: Set up Apple cross-compilation if: startsWith(matrix.build, 'cross-macos') || startsWith(matrix.build, 'cross-ios') run: | - # Test with clang for now, has better cross-compilation support (GCC requires downloading a different toolchain) + # Test with clang/llvm for now, has better cross-compilation support (GCC requires downloading a different toolchain) echo "CC=clang" >> $GITHUB_ENV echo "CXX=clang++" >> $GITHUB_ENV + echo "AR=llvm-ar" >> $GITHUB_ENV # Link with rust-lld UPPERCASE_TARGET_NAME=$(echo "${{ matrix.target }}" | tr '[:lower:]-' '[:upper:]_') echo "CARGO_TARGET_${UPPERCASE_TARGET_NAME}_LINKER=rust-lld" >> $GITHUB_ENV