Skip to content

Commit ab6767e

Browse files
committed
Fix cross-compilation archiving step
1 parent c12e9cb commit ab6767e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ jobs:
167167
env:
168168
CC: ${{ matrix.CC }}
169169
CXX: ${{ matrix.CXX }}
170+
- name: Install llvm tools (for llvm-ar)
171+
if: startsWith(matrix.build, 'cross-macos') || startsWith(matrix.build, 'cross-ios')
172+
run: sudo apt-get install llvm
170173
- name: Download macOS SDK
171174
if: startsWith(matrix.build, 'cross-macos')
172175
run: |
@@ -182,9 +185,10 @@ jobs:
182185
- name: Set up Apple cross-compilation
183186
if: startsWith(matrix.build, 'cross-macos') || startsWith(matrix.build, 'cross-ios')
184187
run: |
185-
# Test with clang for now, has better cross-compilation support (GCC requires downloading a different toolchain)
188+
# Test with clang/llvm for now, has better cross-compilation support (GCC requires downloading a different toolchain)
186189
echo "CC=clang" >> $GITHUB_ENV
187190
echo "CXX=clang++" >> $GITHUB_ENV
191+
echo "AR=llvm-ar" >> $GITHUB_ENV
188192
# Link with rust-lld
189193
UPPERCASE_TARGET_NAME=$(echo "${{ matrix.target }}" | tr '[:lower:]-' '[:upper:]_')
190194
echo "CARGO_TARGET_${UPPERCASE_TARGET_NAME}_LINKER=rust-lld" >> $GITHUB_ENV

0 commit comments

Comments
 (0)