SQLite Forum

Universal binary build for Apple Silicon
Login

Universal binary build for Apple Silicon

(1) By naeco2005 on 2021-04-19 08:30:24 [source]

Hi experts,

I want to check with you if you have the timeline to support Universal Binary on mac Apple Silicon? Or if you have some suggestions about how to change Makefile to support the new clang (above 12.00) compiler to build the universal binaries on Apple Silicon?

Thanks, -Naeco

(2) By Simon Slavin (slavin) on 2021-04-19 20:12:46 in reply to 1 [link] [source]

I lack an M1 Macintosh to experiment with, however …

SQLite, just as it is, works fine on M1 Macs. The processing isn't as fast as it might be but the time bottleneck for SQLite is storage access, not processing. Unless you're work on in-memory databases it won't make much difference.

As far as I know, to get fat binary out of clang you need

clang -arch arm64 -arch x86_64

These two pages look most relevant if you want to work further:

https://build2.org/blog/apple-m1-compilation.xhtml

https://stackoverflow.com/questions/65293299/how-to-build-llvm-clang-clang-for-apple-m1

(3) By Bernardo Ramos (kroggen) on 2021-04-20 19:08:37 in reply to 2 [link] [source]

I use this service to access Apple Silicon on the Cloud:

https://www.scaleway.com/en/saas/

(4) By naeco2005 on 2021-04-26 10:27:05 in reply to 2 [link] [source]

It works for me. Thanks for the help.