summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2017-06-07 13:52:30 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2017-06-12 16:05:33 +0000
commit77c2dd401737f7f6e229216c778d710424c0303f (patch)
tree4f7329d4589973a1a582ee682ccb1854eac0a184 /mkspecs
parent1645bdcbcea84b7606c31d60914ca73dfb4f93fa (diff)
Only use -Xarch when specifying precompiled header if building multi arch
The -Xarch option is not supported by ccache, so unless we need to distinguish precompiled headers for multiple architectures it's better to not pass it. Change-Id: Iae02d37f7a89aedebecedff7290f88d2de1ca362 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/mac/default_post.prf6
1 files changed, 5 insertions, 1 deletions
diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf
index 2bba73d795..395ac34001 100644
--- a/mkspecs/features/mac/default_post.prf
+++ b/mkspecs/features/mac/default_post.prf
@@ -162,8 +162,12 @@ macx-xcode {
else: \
use_flag = -include
+ # Only use Xarch with multi-arch, as the option confuses ccache
+ count(VALID_ARCHS, 1, greaterThan): \
+ QMAKE_CFLAGS_USE_PRECOMPILE += \
+ -Xarch_$${arch}
+
QMAKE_CFLAGS_USE_PRECOMPILE += \
- -Xarch_$${arch} \
$${use_flag}${QMAKE_PCH_OUTPUT_$${arch}}
}
icc_pch_style {