diff options
-rw-r--r-- | configure.json | 2 | ||||
-rw-r--r-- | configure.pri | 11 | ||||
-rw-r--r-- | mkspecs/features/qt_configure.prf | 8 |
3 files changed, 19 insertions, 2 deletions
diff --git a/configure.json b/configure.json index e9ffc972ab..9a9645a23a 100644 --- a/configure.json +++ b/configure.json @@ -454,7 +454,7 @@ "cross_compile": { "label": "Cross compiling", "condition": "call.crossCompile", - "output": [ "publicConfig", "privateConfig" ] + "output": [ "publicConfig", "privateConfig", "crossCompile" ] }, "cxx11default": { "label": "Compiler defaults to C++11 or higher", diff --git a/configure.pri b/configure.pri index d49f5f8db2..74eef36667 100644 --- a/configure.pri +++ b/configure.pri @@ -830,6 +830,9 @@ defineTest(qtConfOutput_reloadSpec) { !isEmpty(config.input.sysroot): \ reloadSpec() + # toolchain.prf uses this. + dummy = $$qtConfEvaluate("features.cross_compile") + bypassNesting() { QMAKE_INTERNAL_INCLUDED_FEATURES -= \ $$[QT_HOST_DATA/src]/mkspecs/features/mac/toolchain.prf \ @@ -913,6 +916,14 @@ defineTest(qtConfOutput_pkgConfig) { } } +defineTest(qtConfOutput_crossCompile) { + !$${2}: return() + + # We need to preempt the output here, as subsequent tests rely on it + CONFIG += cross_compile + export(CONFIG) +} + defineTest(qtConfOutput_useGoldLinker) { !$${2}: return() diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index 1f7fb1b292..81c63205a7 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -746,7 +746,7 @@ defineTest(qtConfTest_compile) { qmake_args += "\"CONFIG += $$qmake_configs\"" - !$$host { + !$$host|!cross_compile { # On WinRT we need to change the entry point as we cannot create windows # applications winrt: \ @@ -764,6 +764,12 @@ defineTest(qtConfTest_compile) { qmake_args += $$EXTRA_QMAKE_ARGS } + # make sure to make this the last override (because of -early) + cross_compile { + # must be done before loading default_pre.prf. + qmake_args += -early "\"CONFIG += cross_compile\"" + } + # Clean up after previous run exists($$test_out_dir/Makefile): \ QMAKE_MAKE = "$$QMAKE_MAKE clean && $$QMAKE_MAKE" |