fix windows gnu build

This commit is contained in:
thewh1teagle 2024-01-08 05:52:29 +02:00
parent eee78dabaa
commit 3fe56418ad
2 changed files with 4 additions and 2 deletions

View file

@ -5,8 +5,10 @@ use whisper_rs_sys::{
whisper_gretype_WHISPER_GRETYPE_RULE_REF,
};
#[cfg_attr(not(windows), repr(u32))]
#[cfg_attr(windows, repr(i32))] // windows being *special* again
#[cfg_attr(target_env = "gnu", repr(u32))] // x86_64-pc-windows-gnu
#[cfg_attr(all(windows, not(target_env = "gnu")), repr(i32))] // windows being *special* again
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum WhisperGrammarElementType {
/// End of rule definition

View file

@ -146,7 +146,7 @@ fn main() {
let destination = config.build();
if env::var("TARGET").unwrap().contains("window") {
if target.contains("window") && !target.contains("gnu") {
println!(
"cargo:rustc-link-search={}",
out.join("build").join("Release").display()