Skip to content

Commit 90f769e

Browse files
committed
Generate proper function impl when cross-compiling
1 parent 510aab2 commit 90f769e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/gen/src/types/function.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ impl Function {
5151
link = "onecoreuap";
5252
}
5353

54-
let body = if cfg!(windows) {
54+
let body = if std::env::var("CARGO_CFG_WINDOWS").is_ok() {
5555
if signature.has_query_interface() {
5656
let leading_params = &signature.params[..signature.params.len() - 2];
5757
let args = leading_params.iter().map(|p| p.gen_win32_abi_arg());

0 commit comments

Comments
 (0)