summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/uikit
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2016-08-23 15:16:42 -0700
committerJake Petroules <jake.petroules@qt.io>2016-09-02 08:25:31 +0000
commit73331eebf885ba8918447d26ba37bef2208bdb5e (patch)
tree0a00f66f844616f5ff55bdc0d5a0ce966f7c8c9a /mkspecs/features/uikit
parent443240b5120af72b261d7a99812066258a6d74f3 (diff)
Enable precompiled headers on iOS, tvOS, watchOS
The actual blocker for precompiled headers is not the iOS/tvOS/watchOS platforms, but the way qmake handled multiple-architecture builds on Apple platforms. This patch allows multi-arch builds to be performed while using precompiled headers. Since df91ef3d6c55692a0236f67b6c6b134a3bf84098 (April 2009), Clang has had support for PCH files in the driver, which allows to use the -include flag to automatically translate to -include-pch. We can then take advantage of the fact that the -include option is allowed to not be separate from its argument, which lets us take advantage of -Xarch to specify a per-architecture precompiled header file. This is done through some magic in the qmake Makefile generator which "multiplexes" the PCH creation rule across multiple architectures and replaces a series of tokens with the proper precompiled header paths and architecture flags at usage point. Change-Id: I76c8dc9cda7e218869c2919f023d9b04f311c6fd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'mkspecs/features/uikit')
-rw-r--r--mkspecs/features/uikit/default_post.prf2
1 files changed, 2 insertions, 0 deletions
diff --git a/mkspecs/features/uikit/default_post.prf b/mkspecs/features/uikit/default_post.prf
index 52c9b1e8c8..199074eefe 100644
--- a/mkspecs/features/uikit/default_post.prf
+++ b/mkspecs/features/uikit/default_post.prf
@@ -114,4 +114,6 @@ macx-xcode {
QMAKE_CFLAGS += $$arch_flags
QMAKE_CXXFLAGS += $$arch_flags
QMAKE_LFLAGS += $$arch_flags
+
+ QMAKE_PCH_ARCHS = $$VALID_ARCHS
}