Skip to content

Commit 80b8215

Browse files
linesightclaude
andcommitted
Fix macOS ARM CI: build libcef_dll_wrapper for native arch
automate.py hardcoded -DPROJECT_ARCH=x86_64 when building libcef_dll_wrapper.a on macOS, producing an x86_64 static lib even on Apple Silicon runners. Replace with platform.machine() so the wrapper is compiled for the actual host architecture (arm64 or x86_64). Also fix a shell bug in the CI arch-verify step where (exit 1) ran in a subshell and didn't actually fail the step, and bump the cache key to v3 to evict the x86_64 wrapper cached by the v2 run. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent bf843f4 commit 80b8215

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/ci-macos.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
path: |
4949
build/cef_binary_*
5050
build/cef*_macarm64
51-
key: cef-macosarm64-v2-${{ steps.cef-version.outputs.value }}
51+
key: cef-macosarm64-v3-${{ steps.cef-version.outputs.value }}
5252

5353
- name: Install build tools
5454
run: python tools/requirements.py
@@ -65,7 +65,7 @@ jobs:
6565
if [ -z "$wrapper" ]; then echo "libcef_dll_wrapper.a not found"; exit 1; fi
6666
archs=$(lipo -info "$wrapper" 2>&1)
6767
echo "$archs"
68-
echo "$archs" | grep -q arm64 || (echo "ERROR: libcef_dll_wrapper.a is not arm64"; exit 1)
68+
echo "$archs" | grep -q arm64 || { echo "ERROR: libcef_dll_wrapper.a is not arm64"; exit 1; }
6969
7070
- name: Configure CMake
7171
run: cmake -S . -B build/_cmake_build -G Ninja -DCMAKE_BUILD_TYPE=Release

tools/automate.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,9 +621,10 @@ def build_wrapper_library_mac():
621621
# On Mac it is required to link libcef_dll_wrapper against
622622
# libc++ library, so must build this library separately
623623
# from cefclient.
624+
mac_arch = platform.machine() # "arm64" or "x86_64"
624625
cmake_wrapper = prepare_build_command()
625626
cmake_wrapper.extend(["cmake", "-G", "Ninja",
626-
"-DPROJECT_ARCH=x86_64",
627+
"-DPROJECT_ARCH=" + mac_arch,
627628
"-DCMAKE_CXX_FLAGS=-stdlib=libc++",
628629
"-DCMAKE_BUILD_TYPE=" + Options.build_type,
629630
".."])

0 commit comments

Comments
 (0)