Fix macOS build target in Xcode project.

- Add missing files for desktop platforms in generate-darwin-source-and-headers.py, and in the Xcode project.
- Add a static library target for macOS.
- Fix "implicit conversion loses integer precision" warnings for iOS mad macOS targets.
This commit is contained in:
Jean-Luc Jumpertz
2017-09-04 15:55:34 +02:00
parent 7d504f7a8e
commit a78da73956
5 changed files with 220 additions and 17 deletions

View File

@@ -395,7 +395,8 @@ ffi_prep_cif_machdep_efi64(ffi_cif *cif);
ffi_status
ffi_prep_cif_machdep (ffi_cif *cif)
{
int gprcount, ssecount, i, avn, ngpr, nsse, flags;
int gprcount, ssecount, i, avn, ngpr, nsse;
unsigned flags;
enum x86_64_reg_class classes[MAX_CLASSES];
size_t bytes, n, rtype_size;
ffi_type *rtype;
@@ -494,7 +495,7 @@ ffi_prep_cif_machdep (ffi_cif *cif)
case FFI_TYPE_SINT32:
case FFI_TYPE_UINT64:
case FFI_TYPE_SINT64:
flags = UNIX64_RET_ST_RAX_RDX | (rtype_size << UNIX64_SIZE_SHIFT);
flags = UNIX64_RET_ST_RAX_RDX | ((unsigned) rtype_size << UNIX64_SIZE_SHIFT);
break;
case FFI_TYPE_FLOAT:
flags = UNIX64_RET_XMM64;
@@ -542,7 +543,7 @@ ffi_prep_cif_machdep (ffi_cif *cif)
flags |= UNIX64_FLAG_XMM_ARGS;
cif->flags = flags;
cif->bytes = ALIGN (bytes, 8);
cif->bytes = (unsigned) ALIGN (bytes, 8);
return FFI_OK;
}