diff options
author | Lawrence D'Anna <lawrence_danna@apple.com> | 2020-07-09 18:39:23 -0700 |
---|---|---|
committer | Lawrence D'Anna <lawrence_danna@apple.com> | 2020-07-09 18:39:23 -0700 |
commit | 6684336eafc9aafebbccb8f48c3b82cc913b3aa8 (patch) | |
tree | 3a8c0bb1bea225de15c2e3724b79c9465c723a92 /setup.py | |
parent | fc9349e8aa5a533ff51f5ec6c592e8024f2d727e (diff) | |
download | cffi-6684336eafc9aafebbccb8f48c3b82cc913b3aa8.tar.gz |
MacOS 11, arm64, ffi_prep_cif_var
On Apple arm64, theABI for a variardic function is different than the
ABI for a fixed-arg function, even of the same arg types.
In order to account for this, CFFI must call ffi_prep_cif_var for
variardic calls.
see: https://developer.apple.com/library/archive/documentation/Xcode/Conceptual/iPhoneOSABIReference/Articles/ARM64FunctionCallingConventions.html
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -152,7 +152,8 @@ else: if 'darwin' in sys.platform and macosx_deployment_target() >= (10, 15): # use libffi from Mac OS SDK extra_compile_args += ['-iwithsysroot/usr/include/ffi'] - define_macros += [('CFFI_TRUST_LIBFFI', '1')] + define_macros += [('CFFI_TRUST_LIBFFI', '1'), + ('HAVE_FFI_PREP_CIF_VAR', '1')] libraries += ['ffi'] else: use_pkg_config() |