Skip to content

Commit b2442ff

Browse files
committed
Revert "Update buildbinaryen.yml."
This reverts commit bea7bc2.
1 parent bea7bc2 commit b2442ff

File tree

1 file changed

+13
-24
lines changed

1 file changed

+13
-24
lines changed

.github/workflows/buildbinaryen.yml

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -32,30 +32,28 @@ jobs:
3232
-DBUILD_TESTS=OFF
3333
-DBINARYEN_CORES=1
3434
runtime: linux-x86
35-
# Windows 64-bit
36-
- os: windows-latest
35+
# Windows 64-bit (cross-compile)
36+
- os: ubuntu-latest
3737
arch: x64
3838
target: windows
3939
cmake-args: >
40-
-DCMAKE_C_COMPILER=gcc
41-
-DCMAKE_CXX_COMPILER=g++
42-
-DCMAKE_C_FLAGS="-static -static-libgcc -static-libstdc++"
43-
-DCMAKE_CXX_FLAGS="-static -static-libgcc -static-libstdc++"
44-
-DBUILD_SHARED_LIBS=OFF
40+
-DCMAKE_SYSTEM_NAME=Windows
41+
-DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc
42+
-DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++
43+
-DBUILD_SHARED_LIBS=ON
4544
-DBUILD_TOOLS=OFF
4645
-DBUILD_TESTS=OFF
4746
-DBINARYEN_CORES=1
4847
runtime: win-x64
49-
# Windows 32-bit (native g++, static)
50-
- os: windows-latest
48+
# Windows 32-bit (cross-compile)
49+
- os: ubuntu-latest
5150
arch: x86
5251
target: windows
5352
cmake-args: >
53+
-DCMAKE_SYSTEM_NAME=Windows
5454
-DCMAKE_C_COMPILER=i686-w64-mingw32-gcc
5555
-DCMAKE_CXX_COMPILER=i686-w64-mingw32-g++
56-
-DCMAKE_C_FLAGS="-static -static-libgcc -static-libstdc++"
57-
-DCMAKE_CXX_FLAGS="-static -static-libgcc -static-libstdc++"
58-
-DBUILD_SHARED_LIBS=OFF
56+
-DBUILD_SHARED_LIBS=ON
5957
-DBUILD_TOOLS=OFF
6058
-DBUILD_TESTS=OFF
6159
-DBINARYEN_CORES=1
@@ -68,19 +66,10 @@ jobs:
6866
with:
6967
submodules: recursive
7068

71-
- name: Install build dependencies (Linux)
72-
if: runner.os == 'Linux'
69+
- name: Install build dependencies
7370
run: |
7471
sudo apt-get update
75-
sudo apt-get install -y g++-multilib gcc-multilib cmake make
76-
77-
- name: Install MinGW (Windows)
78-
if: runner.os == 'Windows'
79-
shell: pwsh
80-
run: |
81-
choco install mingw -y
82-
refreshenv
83-
echo "Added g++ to PATH: $(where g++)"
72+
sudo apt-get install -y g++-multilib gcc-multilib cmake make mingw-w64
8473
8574
- name: Configure
8675
run: cmake -S binaryen -B binaryen ${{ matrix.cmake-args }}
@@ -91,7 +80,7 @@ jobs:
9180
- name: Copy to NuGet runtime folder
9281
run: |
9382
mkdir -p package/runtimes/${{ matrix.runtime }}/native
94-
if [ "${{ matrix.target }}" = "windows" ]; then
83+
if [[ "${{ matrix.target }}" == "windows" ]]; then
9584
cp -r binaryen/bin/* package/runtimes/${{ matrix.runtime }}/native/
9685
else
9786
cp -r binaryen/lib/* package/runtimes/${{ matrix.runtime }}/native/

0 commit comments

Comments
 (0)