summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2022-03-14 16:15:53 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2022-03-14 22:48:34 +0100
commitc45f8d95cf3cc9f9ce8953dce94ca7e266121928 (patch)
tree15a500094e1fda86120aa608af879ee2d86ea142
parent176175e79a37184629f9f7e08aa159ec8d233b56 (diff)
macOS: Update docs for specifying build architecture
Change-Id: I60c8ba70030bf4449eeb4983c8ec570cdf31b228 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--doc/src/platforms/macos.qdoc21
1 files changed, 14 insertions, 7 deletions
diff --git a/doc/src/platforms/macos.qdoc b/doc/src/platforms/macos.qdoc
index c213a6793..f07df3046 100644
--- a/doc/src/platforms/macos.qdoc
+++ b/doc/src/platforms/macos.qdoc
@@ -145,17 +145,24 @@
\section2 Architectures
- By default, Qt is built for x86_64. To build for x86_64h (Haswell). use the
- \c QMAKE_APPLE_DEVICE_ARCHS \c qmake variable.
- This is selectable at configure time:
+ By default, Qt will build for the architecture of your development machine -
+ either \c x86_64, or \c arm64 if you are on an Apple Silicon Mac.
+
+ To build for other architectures you can use the \c QMAKE_APPLE_DEVICE_ARCHS variables
+ in your project files or on the command line. This allows you to both cross-compile
+ to a different architecture, and to build universal (multi-architecture) binaries.
+ For example, to build your application for both \c x86_64 and \c arm64:
+
\code
- ./configure -platform macx-clang QMAKE_APPLE_DEVICE_ARCHS=x86_64h
+ qmake ~/src/myapp QMAKE_APPLE_DEVICE_ARCHS="x86_64 arm64"
\endcode
- \c QMAKE_APPLE_DEVICE_ARCHS can also be specified as a space-delimited list
- in order to build for multiple architectures simultaneously:
+ When specifying the architectures in a project file they should not be quoted, e.g.:
+
\code
- ./configure -platform macx-clang QMAKE_APPLE_DEVICE_ARCHS="x86_64 x86_64h"
+ TEMPLATE = app
+ SOURCES = main.cpp
+ QMAKE_APPLE_DEVICE_ARCHS = x86_64 arm64
\endcode
\section1 Additional Command-Line Options