diff options
| author | Jake Goulding <jake.goulding@gmail.com> | 2020-10-19 21:48:58 -0400 |
|---|---|---|
| committer | Jake Goulding <jake.goulding@gmail.com> | 2020-10-25 21:37:01 -0400 |
| commit | 0a91755ff4b6899e1c0675c48b4652e890ce63aa (patch) | |
| tree | 13c2c974b10287de2d427dad4a22692cd5db2106 /compiler/rustc_codegen_llvm/src | |
| parent | c6ab758e54bd509f75df7a21fd72aa740ac5a4b0 (diff) | |
| download | rust-0a91755ff4b6899e1c0675c48b4652e890ce63aa.tar.gz rust-0a91755ff4b6899e1c0675c48b4652e890ce63aa.zip | |
Properly define va_arg and va_list for aarch64-apple-darwin
From [Apple][]: > Because of these changes, the type `va_list` is an alias for `char*`, > and not for the struct type in the generic procedure call standard. With this change `/x.py test --stage 1 src/test/ui/abi/variadic-ffi` passes. Fixes #78092 [Apple]: https://developer.apple.com/documentation/xcode/writing_arm64_code_for_apple_platforms
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/va_arg.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/va_arg.rs b/compiler/rustc_codegen_llvm/src/va_arg.rs index 0d4aa08a873..b6a0516b8bc 100644 --- a/compiler/rustc_codegen_llvm/src/va_arg.rs +++ b/compiler/rustc_codegen_llvm/src/va_arg.rs @@ -184,8 +184,8 @@ pub(super) fn emit_va_arg( "aarch64" if target.options.is_like_windows => { emit_ptr_va_arg(bx, addr, target_ty, false, Align::from_bytes(8).unwrap(), false) } - // iOS AArch64 - "aarch64" if target.target_os == "ios" => { + // macOS / iOS AArch64 + "aarch64" if target.options.is_like_osx => { emit_ptr_va_arg(bx, addr, target_ty, false, Align::from_bytes(8).unwrap(), true) } "aarch64" => emit_aapcs_va_arg(bx, addr, target_ty), |
