A brand new 4D compiler for Apple Silicon

In a previous blog post, we introduced you to the new Silicon Macs that Apple is launching at the end of this year, as well as our plans to smoothly transition your 4D applications to them.

These new Macs use a new type of processor: ARM processors from the same family Apple uses in iPhones and iPads. A new processor family means a new instruction set and, for us here at 4D, a new compiler.

The 4D compiler translates 4D code into machine code. As a result, we need a specific compilation for each instruction set. Even though we supported other instruction sets (for PowerPC and Motorola architectures) in the past, we currently support only a single instruction set: Intel-based processors instruction set (x86). The release of Silicon means that we need to rework the 4D compiler and add a Silicon compilation to target this new architecture.

A new setting

The database settings will reflect this change. In the compiler tab, you’ll have the choice to build either for your current processor family (Intel on Windows and Intel / Silicon on Macs) or for all processors. Building for all processors will only be available for Macs and will produce a 4D application you can execute natively on all platforms. Since this application will contain an executable for both Intel and Silicon processors, it will be larger than normal. Don’t forget that you can choose to build one application per target if you want to reduce the size.

What’s next?

Apple will make an announcement about the release of Silicon on November 10, 2020.
We’ll keep you updated on the Silicon transition! Feel free to join the conversation on the 4D forum for further details!