Building and debugging in Qt CreatorĪs Qt Creator is still built as a non-universal binary, it will default to producing x86_64 binaries, regardless of which architecture your machine is. Note that if you have third party dependencies these must be built as universal binaries as well.įor more details about building Qt applications for Apple Silicon see the documentation. CMake also defaults to building for your local architecture, so to produce a universal build of your application, add the same argument when configuring: cmake ~/src/myapp -DCMAKE_OSX_ARCHITECTURES="x86_64 arm64" Once you have a Qt build for Apple Silicon your can use CMake like normal to configure and build your application. configure -DCMAKE_OSX_ARCHITECTURES="x86_64 arm64" To produce a universal build, add the following argument to configure. x86_64 if you're on an Intel Mac, and arm64 if you're on an Apple Silicon Mac. By default, Qt will be built for your local architecture, i.e. You can also check out the 6.2 branch of the Qt repositories and build Qt from source. The Qt SDK is fully universal, and should run on both Intel and Apple Silicon hardware. You can try out Qt on Apple Silicon already now by installing the 6.2 preview from the Qt installer.
This includes both cross compiling to arm64, as well as developing Qt applications on Apple Silicon. I'm happy to say that these issues have been resolved, and Qt on Apple Silicon support is scheduled for the upcoming Qt 6.2 release. One major hurdle was convincing the build system to not only treat arm64 as a supported configuration on macOS, but to allow building Qt for both x86_64 and arm64 in one go, producing so called universal builds.Īnother was ensuing that all our third party dependencies such as Chromium, PCRE, and OpenSSL were available and updated with arm64-support.Īnd, last but not least, we needed to add arm64 macOS into our CI so we could run all the tests, which due to lack of virtualization options required some rethinking and additional work. Luckily for us, Qt already had good cross compilation support, as well as arm64 support thanks to our iOS port, so bringing Qt up on Apple Silicon didn't initially take too much effort. The Rosetta translation layer already took care of running existing Qt applications on Apple Silicon, but we wanted native arm64 builds, to squeeze out all the power from this new chipset.
When Apple announced the macOS transition to arm64 last year with their new Apple Silicon M1 chip, we immediately started prototyping native support in Qt - initially on developer transition kits (DTK), and later on production hardware once that became available.