@@ -408,30 +408,29 @@ jobs:
408408
409409 create_wrapper() {
410410 WRAP="$1"
411- # IMPORTANT: heredoc MUST start at column 0 inside the script.
412- cat <<'EOF' > autodetect/$WRAP
413- #!/bin/bash
414- WRAPDIR="$(cd "$(dirname "$0")" && pwd)"
415-
416- # Use cached toolchain if already detected
417- if [ -f "$WRAPDIR/.toolchain" ]; then
418- REALDIR="$(cat "$WRAPDIR/.toolchain")"
419- exec "$REALDIR/$(basename "$0")" "$@"
420- fi
411+ cat <<'EOF' > autodetect/$WRAP
412+ #!/bin/bash
413+ WRAPDIR="$(cd "$(dirname "$0")" && pwd)"
414+
415+ # Use cached toolchain if already detected
416+ if [ -f "$WRAPDIR/.toolchain" ]; then
417+ REALDIR="$(cat "$WRAPDIR/.toolchain")"
418+ exec "$REALDIR/$(basename "$0")" "$@"
419+ fi
421420
422- # Search for Darwin clang produced by native_cctools
423- FOUND=$(find depends -maxdepth 7 -type f -name clang 2>/dev/null | grep native | head -n1)
421+ # Search for Darwin clang produced by native_cctools
422+ FOUND=$(find depends -maxdepth 7 -type f -name clang 2>/dev/null | grep native | head -n1)
424423
425- if [ -n "$FOUND" ]; then
426- REALDIR="$(dirname "$FOUND")"
427- echo "$REALDIR" > "$WRAPDIR/.toolchain"
428- echo "🚀 Auto-detected Darwin compiler at: $REALDIR"
429- exec "$REALDIR/$(basename "$0")" "$@"
430- fi
424+ if [ -n "$FOUND" ]; then
425+ REALDIR="$(dirname "$FOUND")"
426+ echo "$REALDIR" > "$WRAPDIR/.toolchain"
427+ echo "🚀 Auto-detected Darwin compiler at: $REALDIR"
428+ exec "$REALDIR/$(basename "$0")" "$@"
429+ fi
431430
432- # Fallback: use GCC until toolchain is built
433- exec /usr/bin/gcc "$@"
434- EOF
431+ # Fallback: use GCC until toolchain is built
432+ exec /usr/bin/gcc "$@"
433+ EOF
435434 chmod +x autodetect/$WRAP
436435 }
437436
@@ -442,10 +441,17 @@ jobs:
442441 create_wrapper gcc
443442
444443 export PATH="$(pwd)/autodetect:$PATH"
445-
446444 echo "▶ PATH = $PATH"
447- echo "▶ Building depends for macOS…"
448445
446+ echo "▶ FORCING OpenSSL + depends to use clang wrappers"
447+ export CC=clang
448+ export CXX=clang++
449+ export CC_FOR_BUILD=clang
450+
451+ echo "Using CC=$(which clang)"
452+ echo "Using CXX=$(which clang++)"
453+
454+ echo "▶ Building depends for macOS…"
449455 make $MAKEJOBS -C depends HOST=x86_64-apple-darwin11
450456
451457 - name : Build AdventureCoin
0 commit comments