adjust configure to native build optimizations
don't fail to set up cross_compile early enough. otherwise, we'd populate the cache for target builds with data for the host. amends 6b8666c7 and 5060740f. conversely, pass on extra flags to configure tests when not cross building. amends d8be8110 (and 2c5eb3e6). Task-number: QTBUG-58556 Change-Id: I531d71e06204a0b17ae6dabf017a52e0f2efd9a7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
parent
4adc1012e1
commit
2982d327f7
@ -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",
|
||||
|
@ -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()
|
||||
|
||||
|
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user