We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fbcbdb0 commit 1febf58Copy full SHA for 1febf58
compiler/rustc_target/src/spec/mod.rs
@@ -2402,6 +2402,10 @@ impl Target {
2402
pub fn adjust_abi(&self, abi: Abi, c_variadic: bool) -> Abi {
2403
match abi {
2404
Abi::C { .. } => self.default_adjusted_cabi.unwrap_or(abi),
2405
+
2406
+ // On Windows, `extern "system"` behaves like msvc's `__stdcall`
2407
+ // `__stdcall` only applies on x86 and on non-variadic functions
2408
+ // see https://learn.microsoft.com/en-us/cpp/cpp/stdcall?view=msvc-170
2409
Abi::System { unwind } if self.is_like_windows && self.arch == "x86" && !c_variadic => {
2410
Abi::Stdcall { unwind }
2411
}
0 commit comments