Skip to content

Commit

Permalink
Fix cross-compilation archiving step
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Feb 5, 2025
1 parent c12e9cb commit ab6767e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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
Expand Down

0 comments on commit ab6767e

Please sign in to comment.