Skip to content

Commit

Permalink
Merge pull request #62 from messense/windows-i686
Browse files Browse the repository at this point in the history
Fix build for i686-pc-windows-gnu
  • Loading branch information
messense authored Sep 14, 2022
2 parents 671046b + 1e6e091 commit e1df82f
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/zig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -588,10 +588,16 @@ pub fn prepare_zig_linker(target: &str) -> Result<ZigWrapper> {
format!("-target {}-macos-gnu{} {}", arch, abi_suffix, cc_args)
}
}
OperatingSystem::Windows { .. } => format!(
"-target {}-windows-{}{} {}",
arch, target_env, abi_suffix, cc_args,
),
OperatingSystem::Windows { .. } => {
let zig_arch = match arch.as_str() {
"i686" => "i386",
arch => arch,
};
format!(
"-target {}-windows-{}{} {}",
zig_arch, target_env, abi_suffix, cc_args,
)
}
_ => bail!("unsupported target"),
};

Expand Down

0 comments on commit e1df82f

Please sign in to comment.