From 77c2dd401737f7f6e229216c778d710424c0303f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 7 Jun 2017 13:52:30 +0200 Subject: 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 Reviewed-by: Jake Petroules --- mkspecs/features/mac/default_post.prf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mkspecs/features') 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 { -- cgit v1.2.3