@@ -32,27 +32,25 @@ jobs:
3232 -DBUILD_TESTS=OFF
3333 -DBINARYEN_CORES=1
3434 runtime : linux-x86
35- # Windows 64-bit (cross-compile )
36- - os : ubuntu -latest
35+ # Windows 64-bit (native build )
36+ - os : windows -latest
3737 arch : x64
3838 target : windows
3939 cmake-args : >
40- -DCMAKE_SYSTEM_NAME=Windows
41- -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc
42- -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++
40+ -DCMAKE_C_FLAGS="-m64 -w -static-libgcc -static-libstdc++"
41+ -DCMAKE_CXX_FLAGS="-m64 -w -static-libgcc -static-libstdc++"
4342 -DBUILD_SHARED_LIBS=ON
4443 -DBUILD_TOOLS=OFF
4544 -DBUILD_TESTS=OFF
4645 -DBINARYEN_CORES=1
4746 runtime : win-x64
48- # Windows 32-bit (cross-compile )
49- - os : ubuntu -latest
47+ # Windows 32-bit (native build )
48+ - os : windows -latest
5049 arch : x86
5150 target : windows
5251 cmake-args : >
53- -DCMAKE_SYSTEM_NAME=Windows
54- -DCMAKE_C_COMPILER=i686-w64-mingw32-gcc
55- -DCMAKE_CXX_COMPILER=i686-w64-mingw32-g++
52+ -DCMAKE_C_FLAGS="-m32 -w -static-libgcc -static-libstdc++"
53+ -DCMAKE_CXX_FLAGS="-m32 -w -static-libgcc -static-libstdc++"
5654 -DBUILD_SHARED_LIBS=ON
5755 -DBUILD_TOOLS=OFF
5856 -DBUILD_TESTS=OFF
@@ -66,16 +64,28 @@ jobs:
6664 with :
6765 submodules : recursive
6866
69- - name : Install build dependencies
67+ - name : Install build dependencies (Linux)
68+ if : matrix.os == 'ubuntu-latest'
7069 run : |
7170 sudo apt-get update
72- sudo apt-get install -y g++-multilib gcc-multilib cmake make mingw-w64
71+ sudo apt-get install -y g++-multilib gcc-multilib cmake make
72+
73+ - name : Install build dependencies (Windows)
74+ if : matrix.os == 'windows-latest'
75+ run : |
76+ choco install mingw --version 13.2.0 -y --force
7377
7478 - name : Configure
7579 run : cmake -S binaryen -B binaryen ${{ matrix.cmake-args }}
7680
7781 - name : Build
78- run : cmake --build binaryen -- -j$(nproc)
82+ run : |
83+ if [[ "${{ matrix.os }}" == "windows-latest" ]]; then
84+ cmake --build binaryen -- -j$env:NUMBER_OF_PROCESSORS
85+ else
86+ cmake --build binaryen -- -j$(nproc)
87+ fi
88+ shell : bash
7989
8090 - name : Copy to NuGet runtime folder
8191 run : |
0 commit comments