flowkey/UIKit-cross-platform

build error `Implicit declaration of function 'OSAtomicCompareAndSwap32Barrier' is invalid in C99`

Opened this issue · 1 comments

Current behavior

build error Implicit declaration of function 'OSAtomicCompareAndSwap32Barrier' is invalid in C99 when building for apple silicon mac. It works when building for Intel mac via rosetta.

Expected behavior

builds for apple silicon macs

Steps to reproduce

  1. build sample mac app for apple silicon

Screenshots

Screenshot 2021-11-29 at 10 51 32

Environment

  • Device: Mac with M1
  • Xcode: 13.1
  • OS: 12.0.1
  • UIKit Version: master (fc51799)

Yep, saw this too. I think we'll need to update SDL to fix it but for now the workaround is to build for rosetta (esp. because building our UIKit for Mac doesn't make a lot of sense since it's possible to build real UIKit apps for Apple Silicon macs)