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>
bb10
Tor Arne Vestbø 2017-06-07 13:52:30 +02:00
parent 1645bdcbce
commit 77c2dd4017
1 changed files with 5 additions and 1 deletions

View File

@ -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 {