Skip to content

Commit b7ed5b3

Browse files
committed
Try building using MSVC
1 parent e89662d commit b7ed5b3

5 files changed

Lines changed: 7 additions & 13 deletions

File tree

.github/workflows/check.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,8 @@ env:
1919
jobs:
2020
check:
2121
name: check
22-
runs-on: ubuntu-latest
22+
runs-on: windows-latest
2323
steps:
24-
- name: Install Mingw-w64
25-
shell: bash
26-
run: sudo apt install -y --no-install-recommends gcc-mingw-w64-i686
27-
2824
- name: Checkout repository
2925
uses: actions/checkout@v4
3026

@@ -38,4 +34,4 @@ jobs:
3834

3935
- name: Run cargo check
4036
shell: bash
41-
run: RUSTFLAGS="-D warnings" cargo check --workspace
37+
run: RUSTFLAGS="-D warnings" cargo check --workspace --target 'i686-pc-windows-msvc'

.github/workflows/release.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ env:
2222
jobs:
2323
release:
2424
name: release
25-
runs-on: ubuntu-latest
25+
runs-on: windows-latest
2626
steps:
2727
- name: Get release information
2828
id: info
@@ -58,10 +58,6 @@ jobs:
5858
echo "prerelease=$prerelease" >> $GITHUB_OUTPUT
5959
shell: bash
6060

61-
- name: Install Mingw-w64
62-
shell: bash
63-
run: sudo apt install -y --no-install-recommends gcc-mingw-w64-i686
64-
6561
- name: Checkout repository
6662
uses: actions/checkout@v4
6763

@@ -70,7 +66,7 @@ jobs:
7066
run: rustup show
7167

7268
- name: Build release binary
73-
run: cargo build --verbose --release
69+
run: cargo build --verbose --release --target 'i686-pc-windows-msvc'
7470
shell: bash
7571

7672
- name: Build archive

crates/zipfixup/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ pub(crate) type Error = Box<dyn std::error::Error + Send + Sync + 'static>;
1212
pub(crate) type Result<T> = std::result::Result<T, Error>;
1313

1414
/// https://github.com/rust-lang/rust/issues/79609
15+
#[cfg(target_env = "gnu")]
1516
#[unsafe(no_mangle)]
1617
pub extern "C" fn _Unwind_Resume() {}

crates/zippatch/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const VERSION: &str = env!("CARGO_PKG_VERSION");
1212
///
1313
/// needed in the patcher, because overrides cannot be specified per-package
1414
/// (yet)
15+
#[cfg(target_env = "gnu")]
1516
#[unsafe(no_mangle)]
1617
pub extern "C" fn _Unwind_Resume() {}
1718

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[toolchain]
22
channel = "1.88.0"
33
profile = "default"
4-
targets = ["i686-pc-windows-gnu"]
4+
targets = ["i686-pc-windows-gnu", "i686-pc-windows-msvc"]

0 commit comments

Comments
 (0)