summaryrefslogtreecommitdiffstats
path: root/mkspecs/features
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-12-29 15:56:33 +0100
committerLars Knoll <lars.knoll@qt.io>2017-12-30 12:09:53 +0100
commitdb92f2f3aac60218756a1aa8811cf192acc0b0e6 (patch)
treef28a47aebb2f08e221fe7bffafce62a0a96cf7fd /mkspecs/features
parentdd61a1d98ea9fbffeaf0e2adcd0ddd58105f6a75 (diff)
parent44da5b863597e761df3545dc7ff02a9b53bbb13d (diff)
Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts: .qmake.conf mkspecs/win32-g++/qmake.conf src/corelib/global/qglobal_p.h src/corelib/global/qoperatingsystemversion_p.h src/corelib/io/qfilesystemengine_win.cpp src/network/bearer/qbearerengine.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/sql/doc/snippets/code/doc_src_sql-driver.cpp src/widgets/kernel/qwidget_p.h src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qfusionstyle.cpp tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp Change-Id: I80e2722f481b12fff5d967c28f89208c0e9a1dd8
Diffstat (limited to 'mkspecs/features')
-rw-r--r--mkspecs/features/data/configure.json2
-rw-r--r--mkspecs/features/default_pre.prf3
-rw-r--r--mkspecs/features/qt_configure.prf61
-rw-r--r--mkspecs/features/qt_plugin.prf2
-rw-r--r--mkspecs/features/toolchain.prf19
-rw-r--r--mkspecs/features/uikit/xcodebuild.mk2
6 files changed, 61 insertions, 28 deletions
diff --git a/mkspecs/features/data/configure.json b/mkspecs/features/data/configure.json
index 38623d46a4..167c502e82 100644
--- a/mkspecs/features/data/configure.json
+++ b/mkspecs/features/data/configure.json
@@ -9,7 +9,7 @@
"continue": "void",
- "recheck": { "type": "void", "name": "cache_use", "value": "positive" },
+ "recheck": { "type": "optionalString", "name": "cache_recheck" },
"recheck-all": { "type": "void", "name": "cache_use", "value": "none" },
"redo": { "type": "redo" },
diff --git a/mkspecs/features/default_pre.prf b/mkspecs/features/default_pre.prf
index 2d52525190..07a9b1c401 100644
--- a/mkspecs/features/default_pre.prf
+++ b/mkspecs/features/default_pre.prf
@@ -2,6 +2,9 @@
# Note that evaluating variable assignments from the command line
# still happens in between these two steps.
+# In early configure setup; nothing useful to be done here.
+isEmpty(QMAKE_CXX): return()
+
load(exclusive_builds)
CONFIG = \
lex yacc debug exceptions depend_includepath \
diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf
index 1ba96767be..d5dcda22ac 100644
--- a/mkspecs/features/qt_configure.prf
+++ b/mkspecs/features/qt_configure.prf
@@ -499,30 +499,37 @@ defineTest(qtConfLibrary_inline) {
# to make them recognize the same input variables.
input = $$eval($${2}.alias)
- # direct libs. overwrites inline libs.
- defined(config.input.$${input}.libs, var) {
- $${1}.libs = $$eval(config.input.$${input}.libs)
- export($${1}.libs)
- }
-
# build-specific direct libs. overwrites inline libs.
vars =
any = false
all = true
- for (b, $${1}.builds._KEYS_) {
+ for (b, $$list(debug release)) {
iv = $${input}.libs.$${b}
vars += $$eval(config.commandline.rev_assignments.$${iv})
defined(config.input.$${iv}, var) {
- $${1}.builds.$${b}.libs = $$eval(config.input.$${iv})
- export($${1}.builds.$${b}.libs)
+ $${1}.builds.$${b} = $$eval(config.input.$${iv})
+ export($${1}.builds.$${b})
+ $${1}.builds._KEYS_ *= $${b}
any = true
} else {
all = false
}
}
- $$any:!$$all {
- qtConfAddError("Either none or all of $$join(vars, ", ", [, ]) must be specified.")
- return(false)
+ $$any {
+ !$$all {
+ qtConfAddError("Either none or all of $$join(vars, ", ", [, ]) must be specified.")
+ return(false)
+ }
+ export($${1}.builds._KEYS_)
+ # we also reset the generic libs, to avoid surprises.
+ $${1}.libs =
+ export($${1}.libs)
+ }
+
+ # direct libs. overwrites inline libs.
+ defined(config.input.$${input}.libs, var) {
+ $${1}.libs = $$eval(config.input.$${input}.libs)
+ export($${1}.libs)
}
# prefix. prepends to (possibly overwritten) inline libs.
@@ -670,9 +677,10 @@ defineTest(qtConfExportLibrary) {
NAME = $$upper($$name)
# LIBS is emitted even if empty, as this allows the library to be "seen".
qtConfOutputVar(assign, $$output, QMAKE_LIBS_$$NAME, $$libs)
- for (b, $${spfx}.builds._KEYS_): \
- qtConfOutputVar(assign, $$output, QMAKE_LIBS_$${NAME}_$$upper($$b), \
- $$eval($${spfx}.builds.$${b}))
+ for (b, $${spfx}.builds._KEYS_) {
+ eval(blibs = $$eval($${spfx}.builds.$${b}))
+ qtConfOutputVar(assign, $$output, QMAKE_LIBS_$${NAME}_$$upper($$b), $$blibs)
+ }
!isEmpty(defines): qtConfOutputVar(assign, $$output, QMAKE_DEFINES_$$NAME, $$defines)
!isEmpty(includes): qtConfOutputVar(assign, $$output, QMAKE_INCDIR_$$NAME, $$includes)
!isEmpty($${currentConfig}.module): \
@@ -1044,8 +1052,13 @@ defineTest(qtConfSaveResult) {
return()
keys = result $$eval($${1}.cache)
cont = "cache.$${2}._KEYS_ = $$keys"
- for (k, keys): \
+ cache.$${2}._KEYS_ = $$keys
+ export(cache.$${2}._KEYS_)
+ for (k, keys) {
cont += "cache.$${2}.$${k} = $$val_escape($${1}.$${k})"
+ cache.$${2}.$${k} = $$eval($${1}.$${k})
+ export(cache.$${2}.$${k})
+ }
write_file($$QMAKE_CONFIG_CACHE, cont, append)|error()
}
@@ -2033,14 +2046,28 @@ qtConfCheckErrors()
QMAKE_CONFIG_CACHE = $$OUT_PWD/config.cache
QMAKE_CONFIG_CACHE_USE = $$eval(config.input.cache_use)
+cache_recheck = $$eval(config.input.cache_recheck)
+equals(cache_recheck, yes) {
+ QMAKE_CONFIG_CACHE_USE = positive
+ cache_recheck =
+}
isEmpty(QMAKE_CONFIG_CACHE_USE): \
QMAKE_CONFIG_CACHE_USE = all
!equals(QMAKE_CONFIG_CACHE_USE, none) {
include($$QMAKE_CONFIG_CACHE, , true)
# this crudely determines when to discard the cache. this also catches the case
# of no cache being there in the first place.
- !equals(cache.platform, $$[QMAKE_SPEC])|!equals(cache.xplatform, $$[QMAKE_XSPEC]): \
+ !equals(cache.platform, $$[QMAKE_SPEC])|!equals(cache.xplatform, $$[QMAKE_XSPEC]) {
QMAKE_CONFIG_CACHE_USE = none
+ } else: !isEmpty(cache_recheck) {
+ for (cr, $$list($$split(cache_recheck, ","))) {
+ !isEmpty(cache.$${cr}._KEYS_) {
+ cache.$${cr}._KEYS_ =
+ } else {
+ qtConfAddWarning("Attempting to discard non-cached result '$$cr'.")
+ }
+ }
+ }
}
equals(QMAKE_CONFIG_CACHE_USE, none) {
cont = \
diff --git a/mkspecs/features/qt_plugin.prf b/mkspecs/features/qt_plugin.prf
index 62e1b69fde..14fc5f9a94 100644
--- a/mkspecs/features/qt_plugin.prf
+++ b/mkspecs/features/qt_plugin.prf
@@ -48,7 +48,7 @@ CONFIG(static, static|shared)|prefix_build {
!build_pass {
qt_plugin_deps = $$QT $$QT_PRIVATE
- qt_plugin_deps = s,-private$,_private,g
+ qt_plugin_deps ~= s,-private$,_private,g
MODULE_PRI_CONT = \
"QT_PLUGIN.$${MODULE}.TYPE = $$PLUGIN_TYPE" \
diff --git a/mkspecs/features/toolchain.prf b/mkspecs/features/toolchain.prf
index ba41598be1..fdf3d1cdd3 100644
--- a/mkspecs/features/toolchain.prf
+++ b/mkspecs/features/toolchain.prf
@@ -1,7 +1,4 @@
-# In early configure setup; nothing useful to be done here.
-isEmpty(QMAKE_CXX): return()
-
defineReplace(qtMakeExpand) {
out = "$$1"
for(ever) {
@@ -19,7 +16,13 @@ defineTest(qtCompilerErrror) {
what = " host"
else: \
what = " target"
- error("Cannot run$$what compiler '$$1'. Maybe you forgot to setup the environment?")
+ msg = \
+ "Cannot run$$what compiler '$$1'. Output:" \
+ "===================" \
+ $$2 \
+ "===================" \
+ "Maybe you forgot to setup the environment?"
+ error($$join(msg, $$escape_expand(\\n)))
}
cross_compile:host_build: \
@@ -64,7 +67,7 @@ isEmpty($${target_prefix}.INCDIRS) {
cxx_flags += -E -v
output = $$system("$$cmd_prefix $$QMAKE_CXX $$qtMakeExpand($$cxx_flags) -xc++ - 2>&1 $$cmd_suffix", lines, ec)
- !equals(ec, 0): qtCompilerErrror($$QMAKE_CXX)
+ !equals(ec, 0): qtCompilerErrror($$QMAKE_CXX, $$output)
rim_qcc {
for (line, output) {
@@ -124,7 +127,7 @@ isEmpty($${target_prefix}.INCDIRS) {
# What's more, -print-search-dirs can't be used on clang on Apple because it
# won't print all the library paths (only the clang-internal ones).
output = $$system("$$cmd_prefix $$QMAKE_CXX -print-search-dirs", lines, ec)
- !equals(ec, 0): qtCompilerErrror($$QMAKE_CXX)
+ !equals(ec, 0): qtCompilerErrror($$QMAKE_CXX, $$output)
for (line, output) {
contains(line, "^libraries: .*") {
@@ -166,14 +169,14 @@ isEmpty($${target_prefix}.INCDIRS) {
defineReplace(qtVariablesFromMSVC) {
ret = $$system("$$1 -nologo -E $$2 $$system_quote($$PWD/data/macros.cpp) <NUL 2>NUL", lines, ec)
- !equals(ec, 0): qtCompilerErrror($$1)
+ !equals(ec, 0): qtCompilerErrror($$1, $$ret)
return($$ret)
}
defineReplace(qtVariablesFromGCC) {
ret = $$system("$$1 -E $$system_quote($$PWD/data/macros.cpp) \
<$$QMAKE_SYSTEM_NULL_DEVICE 2>$$QMAKE_SYSTEM_NULL_DEVICE", lines, ec)
- !equals(ec, 0): qtCompilerErrror($$1)
+ !equals(ec, 0): qtCompilerErrror($$1, $$ret)
return($$ret)
}
diff --git a/mkspecs/features/uikit/xcodebuild.mk b/mkspecs/features/uikit/xcodebuild.mk
index 435b9dbdf2..0c8d99f4b8 100644
--- a/mkspecs/features/uikit/xcodebuild.mk
+++ b/mkspecs/features/uikit/xcodebuild.mk
@@ -90,7 +90,7 @@ DESTINATION_MESSAGE = "Running $(call tolower,$(CONFIGURATION)) $(ACTION) \
xcodebuild-%:
@$(if $(DESTINATION_NAME), echo $(DESTINATION_MESSAGE),)
- xcodebuild $(ACTION) $(XCODEBUILD_FLAGS) -project $(TARGET).xcodeproj -scheme $(TARGET) $(if $(SDK), -sdk $(SDK),) $(if $(CONFIGURATION), -configuration $(CONFIGURATION),) $(if $(DESTINATION), -destination $(DESTINATION) -destination-timeout 1,) $(if $(INSTALL_ROOT), DSTROOT=$(INSTALL_ROOT),)
+ xcodebuild $(ACTION) $(XCODEBUILD_FLAGS) -project $(TARGET).xcodeproj -scheme $(TARGET) $(if $(SDK), -sdk $(SDK),) $(if $(CONFIGURATION), -configuration $(CONFIGURATION),) $(if $(DESTINATION), -destination $(DESTINATION) -destination-timeout 1,) $(if $(DESTINATION_ID),, ENABLE_ONLY_ACTIVE_RESOURCES=NO) $(if $(INSTALL_ROOT), DSTROOT=$(INSTALL_ROOT),)
xcodebuild-check-device_%: DESTINATION_ID=$(lastword $(subst _, ,$@))