Skip to content

Commit bb84c54

Browse files
committed
Removed macos cross compilation
1 parent c89d72a commit bb84c54

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

.github/workflows/build.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ jobs:
4343
path: ./binaryen/libbinaryen
4444
key: ${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-v${{env.BINARYEN_VERSION}}-libbinaryen
4545

46+
- name: Set macOS architectures
47+
run: |
48+
if [ ${{ matrix.os }} == 'macos-13' ]; then
49+
echo "CIBW_ARCHS_MACOS=x86_64" >> $GITHUB_ENV
50+
elif [ ${{ matrix.os }} == 'macos-14' ]; then
51+
echo "CIBW_ARCHS_MACOS=arm64" >> $GITHUB_ENV
52+
fi
53+
4654
- name: Build wheels
4755
uses: pypa/[email protected]
4856

scripts/build_libbinaryen.sh

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,8 @@ if [[ "$platform" == "macos" ]]; then
6464
tar -xzf "$root_path/binaryen-$file" -C "$root_path/src" --strip-components=1
6565
echo "Extracted source code"
6666

67-
echo "Building for Apple Silicon"
6867
cmake -S "$root_path/src" -B "$root_path/build/" -G Ninja \
69-
-DCMAKE_INSTALL_PREFIX=""$root_path/arm64-macos"" -DCMAKE_OSX_ARCHITECTURES="arm64" \
70-
-DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF -DBUILD_TOOLS=OFF \
71-
-DBUILD_STATIC_LIB=ON
72-
cmake --build "$root_path/build/" -v --config Release --target install
73-
74-
echo "Build for Intel"
75-
cmake -S "$root_path/src" -B "$root_path/build/" -G Ninja \
76-
-DCMAKE_INSTALL_PREFIX=""$root_path/x86_64-macos"" -DCMAKE_OSX_ARCHITECTURES="x86_64" \
68+
-DCMAKE_INSTALL_PREFIX="$lib_path" -DCMAKE_OSX_ARCHITECTURES="$arch" \
7769
-DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF -DBUILD_TOOLS=OFF \
7870
-DBUILD_STATIC_LIB=ON
7971
cmake --build "$root_path/build/" -v --config Release --target install

0 commit comments

Comments
 (0)