prevent configure from putting garbage into .qmake.stash

in cross-builds, toolchain.prf was loaded before CROSS_COMPILE was set
up, leading to caching of possibly nonsensical values.

this change also necessitated that msvc-version.conf is loaded only when
toolchain.prf is, which is best done by loading the former from within
the latter. that seems quite appropriate in the first place.

Change-Id: I62577e827a75e335e03df016bd1aa1932643fd6c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
Oswald Buddenhagen 2017-01-17 17:10:21 +01:00
parent d22579f51e
commit 6834d0eecc
3 changed files with 13 additions and 2 deletions

View File

@ -411,7 +411,10 @@ defineTest(reloadSpec) {
# so don't bother with being selective.
QMAKE_INTERNAL_INCLUDED_FEATURES = \
# loading it gets simulated below.
$$[QT_HOST_DATA/src]/mkspecs/features/device_config.prf
$$[QT_HOST_DATA/src]/mkspecs/features/device_config.prf \
# must be delayed until qdevice.pri is ready.
$$[QT_HOST_DATA/src]/mkspecs/features/mac/toolchain.prf \
$$[QT_HOST_DATA/src]/mkspecs/features/toolchain.prf
_SAVED_CONFIG = $$CONFIG
load(spec_pre)
@ -825,6 +828,13 @@ defineTest(qtConfOutput_reloadSpec) {
!isEmpty($${currentConfig}.output.devicePro)| \
!isEmpty(config.input.sysroot): \
reloadSpec()
bypassNesting() {
QMAKE_INTERNAL_INCLUDED_FEATURES -= \
$$[QT_HOST_DATA/src]/mkspecs/features/mac/toolchain.prf \
$$[QT_HOST_DATA/src]/mkspecs/features/toolchain.prf
load(toolchain)
}
}
defineTest(qtConfOutput_shared) {

View File

@ -153,3 +153,5 @@ unset(target_prefix)
QMAKE_CFLAGS += $$QMAKE_CFLAGS_MSVC_COMPAT
QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_MSVC_COMPAT
msvc:!intel_icl:!clang_cl: include(../common/msvc-version.conf)

View File

@ -1,3 +1,2 @@
CONFIG = rtti_off incremental_off windows $$CONFIG
load(default_pre)
msvc:!intel_icl:!clang_cl: include(../../common/msvc-version.conf)