diff options
author | Liang Qi <liang.qi@qt.io> | 2016-05-12 07:31:50 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-05-12 08:33:08 +0200 |
commit | 990969655c5fb4d03682e96df9b12101f5ee9815 (patch) | |
tree | b8fb5c50285105c8bc5a938fb50f93ff9f24889d /mkspecs/features | |
parent | a213011a53f12f101d08a04afc8fdacd2d54a232 (diff) | |
parent | e64b2234e829cc47872225debcf80d6c06db18f0 (diff) |
Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
config_help.txt
configure
src/corelib/io/qprocess_wince.cpp
src/plugins/platforms/windows/qwindowstheme.cpp
src/plugins/platforms/xcb/qxcbbackingstore.cpp
tests/auto/corelib/tools/qtimezone/BLACKLIST
tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
Change-Id: I26644d1cb3b78412c8ff285e2a55bea1bd641c01
Diffstat (limited to 'mkspecs/features')
-rw-r--r-- | mkspecs/features/android/sdk.prf | 21 | ||||
-rw-r--r-- | mkspecs/features/file_copies.prf | 57 | ||||
-rw-r--r-- | mkspecs/features/java.prf | 21 | ||||
-rw-r--r-- | mkspecs/features/qml_module.prf | 23 | ||||
-rw-r--r-- | mkspecs/features/qt_common.prf | 12 | ||||
-rw-r--r-- | mkspecs/features/qt_example_installs.prf | 5 | ||||
-rw-r--r-- | mkspecs/features/resolve_target.prf | 2 | ||||
-rw-r--r-- | mkspecs/features/spec_pre.prf | 2 | ||||
-rw-r--r-- | mkspecs/features/uikit/resolve_config.prf | 6 | ||||
-rw-r--r-- | mkspecs/features/unix/separate_debug_info.prf | 80 |
10 files changed, 166 insertions, 63 deletions
diff --git a/mkspecs/features/android/sdk.prf b/mkspecs/features/android/sdk.prf new file mode 100644 index 0000000000..eee7ac2d5d --- /dev/null +++ b/mkspecs/features/android/sdk.prf @@ -0,0 +1,21 @@ +API_VERSION_TO_USE = $$(ANDROID_API_VERSION) +isEmpty(API_VERSION_TO_USE): API_VERSION_TO_USE = $$API_VERSION +isEmpty(API_VERSION_TO_USE): API_VERSION_TO_USE = android-16 + +ANDROID_JAR_FILE = $$ANDROID_SDK_ROOT/platforms/$$API_VERSION_TO_USE/android.jar +!exists($$ANDROID_JAR_FILE) { + ANDROID_API_VERSION = $$section(API_VERSION_TO_USE, -, 1, 1) # Get version number from android-XY to ensure numeric comparison + ANDROID_API_VERSIONS = $$files($$ANDROID_SDK_ROOT/platforms/*) + for (VERSION, ANDROID_API_VERSIONS) { + BASENAME = $$basename(VERSION) + BASENAME = $$section(BASENAME, -, 1, 1) + greaterThan(BASENAME, $$ANDROID_API_VERSION): ANDROID_API_VERSION = $$BASENAME + } + API_VERSION_TO_USE = android-$$ANDROID_API_VERSION + ANDROID_JAR_FILE = $$ANDROID_SDK_ROOT/platforms/$$API_VERSION_TO_USE/android.jar +} +!exists($$ANDROID_JAR_FILE) { + error("No suitable Android SDK platform found. Minimum version is $${API_VERSION_TO_USE}.") +} +JAVACLASSPATH += $$ANDROID_JAR_FILE + diff --git a/mkspecs/features/file_copies.prf b/mkspecs/features/file_copies.prf new file mode 100644 index 0000000000..6df294212c --- /dev/null +++ b/mkspecs/features/file_copies.prf @@ -0,0 +1,57 @@ +isEmpty(COPIES): return() +contains(TEMPLATE, .*subdirs): error("COPIES does not work with TEMPLATE=subdirs") + +build_pass:build_all: \ + debug_and_release:debug { + # Avoid that multiple build passes race with each other. + # This will fail to copy anything if the user explicitly invokes + # only the non-primary build. This is unfixable, as at qmake time + # we cannot possibly know how make will be invoked, yet we must + # predict it here. + return() +} + +defineReplace(qtStripProPwd) { + return($$relative_path($$1, $$_PRO_FILE_PWD_)) +} + +for (cp, COPIES) { + isEmpty($${cp}.files): next() + pfx = copy_$${cp} + notdir = false + dir = false + for (f, $${cp}.files) { + fil = $$absolute_path($$f, $$_PRO_FILE_PWD_) + tfiles = $$files($$fil/*) + isEmpty(tfiles): \ + notdir = true + else: \ + dir = true + $${pfx}.files += $$fil + } + $$dir:$$notdir: \ + error("COPIES entry $$cp lists both files and directories.") + path = $$eval($${cp}.path) + isEmpty(path): error("COPIES entry $$cp defines no .path") + base = $$eval($${cp}.base) + isEmpty(base) { + $${pfx}.output = $$path/${QMAKE_FILE_IN_NAME} + } else: isEqual(base, $$_PRO_FILE_PWD_) { + $${pfx}.output = $$path/${QMAKE_FUNC_FILE_IN_qtStripProPwd} + } else { + eval(defineReplace(qtStripSrcDir_$$cp) { \ + return(\$\$relative_path(\$\$1, $$val_escape(base))) \ + }) + $${pfx}.output = $$path/${QMAKE_FUNC_FILE_IN_qtStripSrcDir_$$cp} + } + $${pfx}.input = $${pfx}.files + !$$dir: \ + $${pfx}.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT_PATH} + else: !copy_dir_files: \ + $${pfx}.commands = $$QMAKE_COPY_DIR ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT_PATH} + else: \ + $${pfx}.commands = $$QMAKE_COPY_DIR ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} + $${pfx}.name = COPY ${QMAKE_FILE_IN} + $${pfx}.CONFIG = no_link no_clean target_predeps + QMAKE_EXTRA_COMPILERS += $${pfx} +} diff --git a/mkspecs/features/java.prf b/mkspecs/features/java.prf index 6b9bbd3409..0f0b991f0a 100644 --- a/mkspecs/features/java.prf +++ b/mkspecs/features/java.prf @@ -1,25 +1,6 @@ TEMPLATE = lib android { - API_VERSION_TO_USE = $$(ANDROID_API_VERSION) - isEmpty(API_VERSION_TO_USE): API_VERSION_TO_USE = $$API_VERSION - isEmpty(API_VERSION_TO_USE): API_VERSION_TO_USE = android-16 - - ANDROID_JAR_FILE = $$ANDROID_SDK_ROOT/platforms/$$API_VERSION_TO_USE/android.jar - !exists($$ANDROID_JAR_FILE) { - ANDROID_API_VERSION = $$section(API_VERSION_TO_USE, -, 1, 1) # Get version number from android-XY to ensure numeric comparison - ANDROID_API_VERSIONS = $$files($$ANDROID_SDK_ROOT/platforms/*) - for (VERSION, ANDROID_API_VERSIONS) { - BASENAME = $$basename(VERSION) - BASENAME = $$section(BASENAME, -, 1, 1) - greaterThan(BASENAME, $$ANDROID_API_VERSION): ANDROID_API_VERSION = $$BASENAME - } - API_VERSION_TO_USE = android-$$ANDROID_API_VERSION - ANDROID_JAR_FILE = $$ANDROID_SDK_ROOT/platforms/$$API_VERSION_TO_USE/android.jar - } - !exists($$ANDROID_JAR_FILE) { - error("No suitable Android SDK platform found. Minimum version is $${API_VERSION_TO_USE}.") - } - JAVACLASSPATH += $$ANDROID_JAR_FILE + load(sdk) # FIXME: This is a hack to work around some hardcoded values in the android.prf. The # android.prf should be fixed and this should be removed. diff --git a/mkspecs/features/qml_module.prf b/mkspecs/features/qml_module.prf index 2115b39c04..05f97a5532 100644 --- a/mkspecs/features/qml_module.prf +++ b/mkspecs/features/qml_module.prf @@ -18,9 +18,6 @@ fq_qml_files = $$qmldir_file for(qmlf, QML_FILES): fq_qml_files += $$absolute_path($$qmlf, $$_PRO_FILE_PWD_) -# Only for Qt Creator's project view -OTHER_FILES += $$fq_qml_files - qml1_target: \ instbase = $$[QT_INSTALL_IMPORTS] else: \ @@ -28,24 +25,6 @@ else: \ !qml1_target:static: CONFIG += builtin_resources -!force_independent:if(!debug_and_release|!build_all|CONFIG(release, debug|release)) { - # These bizarre rules copy the files to the qtbase build directory - - defineReplace(qmlModStripSrcDir) { - return($$relative_path($$1, $$_PRO_FILE_PWD_)) - } - - !builtin_resources: qmlfiles2build.input = fq_qml_files - else: qmlfiles2build.input = qmldir_file - qmlfiles2build.output = $$instbase/$$TARGETPATH/${QMAKE_FUNC_FILE_IN_qmlModStripSrcDir} - !contains(TEMPLATE, vc.*): qmlfiles2build.variable_out = PRE_TARGETDEPS - qmlfiles2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} - qmlfiles2build.name = COPY ${QMAKE_FILE_IN} - qmlfiles2build.CONFIG = no_link no_clean - - QMAKE_EXTRA_COMPILERS += qmlfiles2build -} - builtin_resources { URITARGET = $$replace(URI, "\\.", "_") # Ensure the qml files are included in the resources @@ -61,3 +40,5 @@ qmldir.base = $$_PRO_FILE_PWD_ else: qmldir.files = $$qmldir_file qmldir.path = $$instbase/$$TARGETPATH INSTALLS += qmldir + +!prefix_build: COPIES += qmldir diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf index c1c668aec8..b060ff604e 100644 --- a/mkspecs/features/qt_common.prf +++ b/mkspecs/features/qt_common.prf @@ -44,6 +44,10 @@ contains(TEMPLATE, .*lib) { QMAKE_PRL_INSTALL_REPLACE += lib_replace } +# The remainder of this file must not apply to bootstrapped tools, +# as the host compiler's version and capabilities are not checked. +host_build:force_bootstrap: return() + # Extra warnings for Qt non-example code, to ensure cleanliness of the sources. # The block below may turn these warnings into errors for some Qt targets. # -Wdate-time: warn if we use __DATE__ or __TIME__ (we want to be able to reproduce the exact same binary) @@ -65,16 +69,16 @@ warnings_are_errors:warning_clean { # compiler. clang:!ios { # Apple clang 4.0-4.2,5.0-5.1,6.0-6.4 - # Regular clang 3.3-3.7 + # Regular clang 3.3-3.8 apple_ver = $${QT_APPLE_CLANG_MAJOR_VERSION}.$${QT_APPLE_CLANG_MINOR_VERSION} reg_ver = $${QT_CLANG_MAJOR_VERSION}.$${QT_CLANG_MINOR_VERSION} - contains(apple_ver, "4\\.[012]|5\\.[01]|6\\.[01234]")|contains(reg_ver, "3\\.[3-7]") { + contains(apple_ver, "4\\.[012]|5\\.[01]|6\\.[01234]")|contains(reg_ver, "3\\.[3-8]") { QMAKE_CXXFLAGS_WARN_ON += -Werror -Wno-error=\\$${LITERAL_HASH}warnings -Wno-error=deprecated-declarations $$WERROR } } else:intel_icc:linux { - # Intel CC 13.0 - 16.0, on Linux only + # Intel CC 13.0 - 17.0, on Linux only ver = $${QT_ICC_MAJOR_VERSION}.$${QT_ICC_MINOR_VERSION} - linux:contains(ver, "(1[345]\\.|16\\.0)") { + linux:contains(ver, "(1[3456]\\.|17\\.0)") { # 177: function "entity" was declared but never referenced # (too aggressive; ICC reports even for functions created due to template instantiation) # 1224: #warning directive diff --git a/mkspecs/features/qt_example_installs.prf b/mkspecs/features/qt_example_installs.prf index a644904981..ebf68a8a21 100644 --- a/mkspecs/features/qt_example_installs.prf +++ b/mkspecs/features/qt_example_installs.prf @@ -47,8 +47,13 @@ probase = $$relative_path($$_PRO_FILE_PWD_, $$dirname(_QMAKE_CONF_)/examples) sourcefiles += $$resrc } } + sourcefiles += \ + $$ANDROID_PACKAGE_SOURCE_DIR \ + $$QMAKE_INFO_PLIST \ + $$DISTFILES extras = \ $$_PRO_FILE_PWD_/README \ + $$_PRO_FILE_PWD_/README.TXT \ $$files($$_PRO_FILE_PWD_/*.pri) \ $$replace(_PRO_FILE_, \\.pro$, .qmlproject) \ $$replace(_PRO_FILE_, \\.pro$, .json) \ diff --git a/mkspecs/features/resolve_target.prf b/mkspecs/features/resolve_target.prf index 5c3a46e117..629a02a4f3 100644 --- a/mkspecs/features/resolve_target.prf +++ b/mkspecs/features/resolve_target.prf @@ -28,7 +28,7 @@ win32 { } QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}$${TARGET}$${TARGET_VERSION_EXT}$${TARGET_EXT} } else { - contains(TEMPLATE, .*lib):LIBPREFIX = lib + contains(TEMPLATE, .*lib):!if(plugin:no_plugin_name_prefix): LIBPREFIX = lib mac { equals(TEMPLATE, lib) { diff --git a/mkspecs/features/spec_pre.prf b/mkspecs/features/spec_pre.prf index ff310d9793..090f348ebf 100644 --- a/mkspecs/features/spec_pre.prf +++ b/mkspecs/features/spec_pre.prf @@ -51,5 +51,5 @@ equals(QMAKE_HOST.os, Windows) { QMAKE_SH = sh } -CONFIG = qt warn_on release link_prl +CONFIG = file_copies qt warn_on release link_prl QT = core gui diff --git a/mkspecs/features/uikit/resolve_config.prf b/mkspecs/features/uikit/resolve_config.prf index 38d6c74ccb..c3ab90f45e 100644 --- a/mkspecs/features/uikit/resolve_config.prf +++ b/mkspecs/features/uikit/resolve_config.prf @@ -8,6 +8,12 @@ xcodebuild { load(resolve_config) +# Legacy exclusive build configurations for backwards compatibility +CONFIG($${device.CONFIG}, $${device.CONFIG}|$${simulator.CONFIG}): \ + CONFIG += device +else: CONFIG($${simulator.CONFIG}, $${device.CONFIG}|$${simulator.CONFIG}): \ + CONFIG += simulator + CONFIG(simulator, simulator|device): \ CONFIG -= device $${device.CONFIG} else: \ diff --git a/mkspecs/features/unix/separate_debug_info.prf b/mkspecs/features/unix/separate_debug_info.prf index 7d9022f8d7..460ad63e22 100644 --- a/mkspecs/features/unix/separate_debug_info.prf +++ b/mkspecs/features/unix/separate_debug_info.prf @@ -1,29 +1,77 @@ - -have_target:!static:!isEmpty(QMAKE_OBJCOPY) { - qnx { - debug_info_suffix = sym - debug_info_keep = --keep-file-symbols - debug_info_strip = --strip-debug -R.ident +have_target:!static:if(darwin|!isEmpty(QMAKE_OBJCOPY)) { + darwin { + debug_info_copy_bin = $$QMAKE_DSYMUTIL + debug_info_strip_bin = $$QMAKE_STRIP + debug_info_suffix = dSYM + debug_info_out = --flat -o + debug_info_strip = -S } else { - debug_info_suffix = debug - debug_info_keep = --only-keep-debug - debug_info_strip = --strip-debug + debug_info_copy_bin = $$QMAKE_OBJCOPY + debug_info_strip_bin = $$QMAKE_OBJCOPY + qnx { + debug_info_suffix = sym + debug_info_keep = --keep-file-symbols + debug_info_strip = --strip-debug -R.ident + } else { + debug_info_suffix = debug + debug_info_keep = --only-keep-debug + debug_info_strip = --strip-debug + } } load(resolve_target) - QMAKE_TARGET_DEBUG_INFO = $${QMAKE_RESOLVED_TARGET}.$$debug_info_suffix + debug_info_target = $$QMAKE_RESOLVED_TARGET + + darwin { + !isEmpty(QMAKE_RESOLVED_BUNDLE) { + debug_info_target = $$QMAKE_RESOLVED_BUNDLE + CONFIG += any_bundle + } + + debug_info_target_dir = $${debug_info_target}.$$debug_info_suffix/Contents/Resources/DWARF + !isEmpty(QMAKE_RESOLVED_BUNDLE): \ + QMAKE_TARGET_DEBUG_INFO = $$debug_info_target_dir/$$TARGET + else: \ + QMAKE_TARGET_DEBUG_INFO = $$debug_info_target_dir/$$section(QMAKE_RESOLVED_TARGET, /, -1, -1) + + if(any_bundle:!build_pass)|if(!any_bundle:if(build_pass|isEmpty(BUILDS))) { + equals(TEMPLATE, lib):lib_bundle:!isEmpty(QMAKE_FRAMEWORK_BUNDLE_NAME): \ + BUNDLEIDENTIFIER = $$replace(QMAKE_FRAMEWORK_BUNDLE_NAME, \\.framework$, ) + else: equals(TEMPLATE, app):app_bundle:!isEmpty(QMAKE_APPLICATION_BUNDLE_NAME): \ + BUNDLEIDENTIFIER = $$replace(QMAKE_APPLICATION_BUNDLE_NAME, \\.app$, ) + else: \ + BUNDLEIDENTIFIER = $${TARGET} + + !isEmpty(QMAKE_TARGET_BUNDLE_PREFIX): \ + BUNDLEIDENTIFIER = $$replace(QMAKE_TARGET_BUNDLE_PREFIX, \\.$, ).$${BUNDLEIDENTIFIER} + else: \ + BUNDLEIDENTIFIER = com.yourcompany.$${BUNDLEIDENTIFIER} + + BUNDLEIDENTIFIER ~= s,_,-, + + debug_info_plist.input = $$QMAKESPEC/Info.plist.dSYM.in + debug_info_plist.output = $${debug_info_target}.$$debug_info_suffix/Contents/Info.plist + QMAKE_SUBSTITUTES += debug_info_plist + } + } else { + QMAKE_TARGET_DEBUG_INFO = $${QMAKE_RESOLVED_TARGET}.$$debug_info_suffix + } shell_target = $$shell_quote($$relative_path($$QMAKE_RESOLVED_TARGET, $$OUT_PWD)) shell_target_debug_info = $$shell_quote($$relative_path($$QMAKE_TARGET_DEBUG_INFO, $$OUT_PWD)) - copy_debug_info = $$QMAKE_OBJCOPY $$debug_info_keep $$shell_target $$shell_target_debug_info - strip_debug_info = $$QMAKE_OBJCOPY $$debug_info_strip $$shell_target - link_debug_info = $$QMAKE_OBJCOPY --add-gnu-debuglink=$$shell_target_debug_info $$shell_target - chmod_debug_info = chmod -x $$shell_target_debug_info + copy_debug_info = $$debug_info_copy_bin $$debug_info_keep $$shell_target $$debug_info_out $$shell_target_debug_info + strip_debug_info = $$debug_info_strip_bin $$debug_info_strip $$shell_target !isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$escape_expand(\\n\\t)$$QMAKE_POST_LINK - QMAKE_POST_LINK = $$copy_debug_info && $$strip_debug_info && $$link_debug_info && $$chmod_debug_info $$QMAKE_POST_LINK + darwin { + mkdir_debug_info = $$QMAKE_MKDIR $$shell_quote($$debug_info_target_dir) + QMAKE_POST_LINK = $$mkdir_debug_info && $$copy_debug_info && $$strip_debug_info $$QMAKE_POST_LINK + } else { + link_debug_info = $$QMAKE_OBJCOPY --add-gnu-debuglink=$$shell_target_debug_info $$shell_target + chmod_debug_info = chmod -x $$shell_target_debug_info + QMAKE_POST_LINK = $$copy_debug_info && $$strip_debug_info && $$link_debug_info && $$chmod_debug_info $$QMAKE_POST_LINK + } silent:QMAKE_POST_LINK = @echo creating $@.$$debug_info_suffix && $$QMAKE_POST_LINK target.targets += $$QMAKE_TARGET_DEBUG_INFO QMAKE_DISTCLEAN += $$QMAKE_TARGET_DEBUG_INFO } - |