Skip to content

Commit 789bef7

Browse files
Update ci.yml
1 parent f570a27 commit 789bef7

1 file changed

Lines changed: 11 additions & 25 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -396,37 +396,23 @@ jobs:
396396
shell: bash
397397
run: |
398398
set -e
399-
echo "▶ Setting global compiler override…"
400-
401-
mkdir -p fakebin
402-
403-
cat <<'EOF' > fakebin/cc
404-
#!/bin/bash
405-
exec /usr/bin/gcc "$@"
406-
EOF
407-
408-
cat <<'EOF' > fakebin/clang
409-
#!/bin/bash
410-
if command -v clang >/dev/null 2>&1; then
411-
exec clang "$@"
412-
else
413-
exec /usr/bin/gcc "$@"
414-
fi
415-
EOF
416-
417-
chmod +x fakebin/cc fakebin/clang
418-
export PATH="$(pwd)/fakebin:$PATH"
419399
400+
echo "▶ macOS cross-compile build starting…"
420401
echo "▶ Enabling verbose build…"
421402
export V=1
422403
423-
# heartbeat to prevent GitHub killing idle builds
404+
# heartbeat to prevent GitHub timeout
424405
( while true; do echo "❤️ still building mac depends…"; sleep 60; done ) &
425406
426-
echo "▶ Building depends with forced compiler override…"
427-
CC=cc \
428-
CXX=clang++ \
429-
CC_FOR_BUILD=cc \
407+
echo "▶ Setting macOS-specific compiler variables…"
408+
409+
# These apply ONLY to macOS cross builds, not native Linux tools
410+
export CC="x86_64-apple-darwin11-clang"
411+
export CXX="x86_64-apple-darwin11-clang++"
412+
export CC_FOR_BUILD="gcc" # native Linux compiler for native tools
413+
414+
echo "▶ Building depends (MacOS target: ${{ matrix.host }})…"
415+
430416
make $MAKEJOBS -C depends HOST=${{ matrix.host }}
431417
432418
- name: CCache

0 commit comments

Comments
 (0)