Skip to content

Commit 8e6e62f

Browse files
committed
Fix wasm build
`cargo build --target wasm32-wasi --features llvm11-0` fails with: --> /home/sean/git/inkwell/src/module.rs:601:95 | 601 | pub fn write_bitcode_to_file(&self, file: &File, should_close: bool, unbuffered: bool) -> bool { | --------------------- ^^^^ expected `bool`, found `()` | | | implicitly returns `()` as its body has no tail or `return` expression Note that as_raw_fd() cannot be used on wasi yet, since this depends on wasm_ext which is unstable: rust-lang/rust#71213 Signed-off-by: Sean Young <[email protected]>
1 parent c55d98d commit 8e6e62f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/module.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ impl<'ctx> Module<'ctx> {
610610
LLVMWriteBitcodeToFD(self.module.get(), file.as_raw_fd(), should_close as i32, unbuffered as i32) == 0
611611
}
612612
}
613-
#[cfg(windows)]
613+
#[cfg(not(unix))]
614614
return false;
615615
}
616616

0 commit comments

Comments
 (0)