From f494da8895fa7a28dbc9ff0a66235632c8c33167 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 3 Jan 2016 00:15:47 -0200 Subject: Clang 3.8 is clean of warnings Change-Id: Ibc83b9f7e3bc4962ae35ffff1425c8e686579e15 Reviewed-by: Jake Petroules --- mkspecs/features/qt_common.prf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf index e70d3bf172..cc8ed87b90 100644 --- a/mkspecs/features/qt_common.prf +++ b/mkspecs/features/qt_common.prf @@ -50,10 +50,10 @@ 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 { -- cgit v1.2.3 From ab599a39313c22fd14cc5466cea5c61bbcdbba8e Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Wed, 6 Apr 2016 20:37:44 -0700 Subject: qmake: Add support for separate debug info on Apple platforms. This makes the -separate-debug-info configure optional functional, which generates dSYM debug info bundles for Qt libraries on Apple platforms. Task-number: QTBUG-37952 Done-with: Oswald Buddenhagen Change-Id: Ia247674740bf450130a15db926df07fa9007e2ca Reviewed-by: Oswald Buddenhagen --- mkspecs/common/mac.conf | 3 + mkspecs/features/unix/separate_debug_info.prf | 80 +++++++++++++++++++++------ mkspecs/macx-clang-32/Info.plist.dSYM.in | 18 ++++++ mkspecs/macx-clang/Info.plist.dSYM.in | 18 ++++++ mkspecs/macx-g++-32/Info.plist.dSYM.in | 18 ++++++ mkspecs/macx-g++/Info.plist.dSYM.in | 18 ++++++ mkspecs/macx-g++40/Info.plist.dSYM.in | 18 ++++++ mkspecs/macx-g++42/Info.plist.dSYM.in | 18 ++++++ mkspecs/macx-icc/Info.plist.dSYM.in | 18 ++++++ mkspecs/macx-ios-clang/Info.plist.dSYM.in | 18 ++++++ mkspecs/macx-llvm/Info.plist.dSYM.in | 18 ++++++ 11 files changed, 229 insertions(+), 16 deletions(-) create mode 100644 mkspecs/macx-clang-32/Info.plist.dSYM.in create mode 100644 mkspecs/macx-clang/Info.plist.dSYM.in create mode 100644 mkspecs/macx-g++-32/Info.plist.dSYM.in create mode 100644 mkspecs/macx-g++/Info.plist.dSYM.in create mode 100644 mkspecs/macx-g++40/Info.plist.dSYM.in create mode 100644 mkspecs/macx-g++42/Info.plist.dSYM.in create mode 100644 mkspecs/macx-icc/Info.plist.dSYM.in create mode 100644 mkspecs/macx-ios-clang/Info.plist.dSYM.in create mode 100644 mkspecs/macx-llvm/Info.plist.dSYM.in (limited to 'mkspecs') diff --git a/mkspecs/common/mac.conf b/mkspecs/common/mac.conf index ad3c638a6f..aac9d1b3d7 100644 --- a/mkspecs/common/mac.conf +++ b/mkspecs/common/mac.conf @@ -29,6 +29,9 @@ QMAKE_LIBS_DYNLOAD = QMAKE_LIBS_OPENGL = -framework OpenGL -framework AGL QMAKE_LIBS_THREAD = +QMAKE_DSYMUTIL = dsymutil +QMAKE_STRIP = strip + QMAKE_AR = ar cq QMAKE_RANLIB = ranlib -s QMAKE_NM = nm -P 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 } - diff --git a/mkspecs/macx-clang-32/Info.plist.dSYM.in b/mkspecs/macx-clang-32/Info.plist.dSYM.in new file mode 100644 index 0000000000..a8c8d0d4fb --- /dev/null +++ b/mkspecs/macx-clang-32/Info.plist.dSYM.in @@ -0,0 +1,18 @@ + + + + + CFBundleIdentifier + com.apple.xcode.dsym.$${BUNDLEIDENTIFIER} + CFBundlePackageType + dSYM + CFBundleSignature + ???? +!!IF !isEmpty(VERSION) + CFBundleShortVersionString + $${VER_MAJ}.$${VER_MIN} + CFBundleVersion + $${VER_MAJ}.$${VER_MIN}.$${VER_PAT} +!!ENDIF + + diff --git a/mkspecs/macx-clang/Info.plist.dSYM.in b/mkspecs/macx-clang/Info.plist.dSYM.in new file mode 100644 index 0000000000..a8c8d0d4fb --- /dev/null +++ b/mkspecs/macx-clang/Info.plist.dSYM.in @@ -0,0 +1,18 @@ + + + + + CFBundleIdentifier + com.apple.xcode.dsym.$${BUNDLEIDENTIFIER} + CFBundlePackageType + dSYM + CFBundleSignature + ???? +!!IF !isEmpty(VERSION) + CFBundleShortVersionString + $${VER_MAJ}.$${VER_MIN} + CFBundleVersion + $${VER_MAJ}.$${VER_MIN}.$${VER_PAT} +!!ENDIF + + diff --git a/mkspecs/macx-g++-32/Info.plist.dSYM.in b/mkspecs/macx-g++-32/Info.plist.dSYM.in new file mode 100644 index 0000000000..a8c8d0d4fb --- /dev/null +++ b/mkspecs/macx-g++-32/Info.plist.dSYM.in @@ -0,0 +1,18 @@ + + + + + CFBundleIdentifier + com.apple.xcode.dsym.$${BUNDLEIDENTIFIER} + CFBundlePackageType + dSYM + CFBundleSignature + ???? +!!IF !isEmpty(VERSION) + CFBundleShortVersionString + $${VER_MAJ}.$${VER_MIN} + CFBundleVersion + $${VER_MAJ}.$${VER_MIN}.$${VER_PAT} +!!ENDIF + + diff --git a/mkspecs/macx-g++/Info.plist.dSYM.in b/mkspecs/macx-g++/Info.plist.dSYM.in new file mode 100644 index 0000000000..a8c8d0d4fb --- /dev/null +++ b/mkspecs/macx-g++/Info.plist.dSYM.in @@ -0,0 +1,18 @@ + + + + + CFBundleIdentifier + com.apple.xcode.dsym.$${BUNDLEIDENTIFIER} + CFBundlePackageType + dSYM + CFBundleSignature + ???? +!!IF !isEmpty(VERSION) + CFBundleShortVersionString + $${VER_MAJ}.$${VER_MIN} + CFBundleVersion + $${VER_MAJ}.$${VER_MIN}.$${VER_PAT} +!!ENDIF + + diff --git a/mkspecs/macx-g++40/Info.plist.dSYM.in b/mkspecs/macx-g++40/Info.plist.dSYM.in new file mode 100644 index 0000000000..a8c8d0d4fb --- /dev/null +++ b/mkspecs/macx-g++40/Info.plist.dSYM.in @@ -0,0 +1,18 @@ + + + + + CFBundleIdentifier + com.apple.xcode.dsym.$${BUNDLEIDENTIFIER} + CFBundlePackageType + dSYM + CFBundleSignature + ???? +!!IF !isEmpty(VERSION) + CFBundleShortVersionString + $${VER_MAJ}.$${VER_MIN} + CFBundleVersion + $${VER_MAJ}.$${VER_MIN}.$${VER_PAT} +!!ENDIF + + diff --git a/mkspecs/macx-g++42/Info.plist.dSYM.in b/mkspecs/macx-g++42/Info.plist.dSYM.in new file mode 100644 index 0000000000..a8c8d0d4fb --- /dev/null +++ b/mkspecs/macx-g++42/Info.plist.dSYM.in @@ -0,0 +1,18 @@ + + + + + CFBundleIdentifier + com.apple.xcode.dsym.$${BUNDLEIDENTIFIER} + CFBundlePackageType + dSYM + CFBundleSignature + ???? +!!IF !isEmpty(VERSION) + CFBundleShortVersionString + $${VER_MAJ}.$${VER_MIN} + CFBundleVersion + $${VER_MAJ}.$${VER_MIN}.$${VER_PAT} +!!ENDIF + + diff --git a/mkspecs/macx-icc/Info.plist.dSYM.in b/mkspecs/macx-icc/Info.plist.dSYM.in new file mode 100644 index 0000000000..a8c8d0d4fb --- /dev/null +++ b/mkspecs/macx-icc/Info.plist.dSYM.in @@ -0,0 +1,18 @@ + + + + + CFBundleIdentifier + com.apple.xcode.dsym.$${BUNDLEIDENTIFIER} + CFBundlePackageType + dSYM + CFBundleSignature + ???? +!!IF !isEmpty(VERSION) + CFBundleShortVersionString + $${VER_MAJ}.$${VER_MIN} + CFBundleVersion + $${VER_MAJ}.$${VER_MIN}.$${VER_PAT} +!!ENDIF + + diff --git a/mkspecs/macx-ios-clang/Info.plist.dSYM.in b/mkspecs/macx-ios-clang/Info.plist.dSYM.in new file mode 100644 index 0000000000..a8c8d0d4fb --- /dev/null +++ b/mkspecs/macx-ios-clang/Info.plist.dSYM.in @@ -0,0 +1,18 @@ + + + + + CFBundleIdentifier + com.apple.xcode.dsym.$${BUNDLEIDENTIFIER} + CFBundlePackageType + dSYM + CFBundleSignature + ???? +!!IF !isEmpty(VERSION) + CFBundleShortVersionString + $${VER_MAJ}.$${VER_MIN} + CFBundleVersion + $${VER_MAJ}.$${VER_MIN}.$${VER_PAT} +!!ENDIF + + diff --git a/mkspecs/macx-llvm/Info.plist.dSYM.in b/mkspecs/macx-llvm/Info.plist.dSYM.in new file mode 100644 index 0000000000..a8c8d0d4fb --- /dev/null +++ b/mkspecs/macx-llvm/Info.plist.dSYM.in @@ -0,0 +1,18 @@ + + + + + CFBundleIdentifier + com.apple.xcode.dsym.$${BUNDLEIDENTIFIER} + CFBundlePackageType + dSYM + CFBundleSignature + ???? +!!IF !isEmpty(VERSION) + CFBundleShortVersionString + $${VER_MAJ}.$${VER_MIN} + CFBundleVersion + $${VER_MAJ}.$${VER_MIN}.$${VER_PAT} +!!ENDIF + + -- cgit v1.2.3 From 540681749388e9b2ca775914faed27b936776978 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Tue, 12 Apr 2016 15:24:09 -0700 Subject: Fix separate_debug_info with no_plugin_name_prefix Task-number: QTBUG-51782 Change-Id: I5499139c732f2ff474095e30bc1f7a22743f4b12 Reviewed-by: Oswald Buddenhagen --- mkspecs/features/resolve_target.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mkspecs') 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) { -- cgit v1.2.3 From 3010c387132a54f81147d5b2c17d96b27f49fe0f Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Fri, 22 Apr 2016 16:35:02 +0200 Subject: Android: Make SDK detection its own qmake feature To allow reusing the logic which detects the appropriate Android SDK version to use for building the Java code, this is now separated into its own .prf file. This is required by Qt Purchasing to avoid duplicating the logic there. Change-Id: Ief5f5e70dab79751ef9e5a9c4a019bfda686cd09 Reviewed-by: Oswald Buddenhagen --- mkspecs/features/android/sdk.prf | 21 +++++++++++++++++++++ mkspecs/features/java.prf | 21 +-------------------- 2 files changed, 22 insertions(+), 20 deletions(-) create mode 100644 mkspecs/features/android/sdk.prf (limited to 'mkspecs') 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/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. -- cgit v1.2.3 From 8996776f1e494a6858635068e21519dfdc29967d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 25 Apr 2016 15:21:01 +0200 Subject: iOS: Handle old exclusive build CONFIG names for simulator and device Qt Creator uses e.g. CONFIG+=iphoneos to make the default build target be device. Now that the exclusive build is named simulator_and_device to support e.g. tvOS, we need to handle the old CONFIG names for backwards compatibility. Task-number: QTBUG-52970 Change-Id: I0f864bebf11e657eb4225a182753037205f450b8 Reviewed-by: Oswald Buddenhagen --- mkspecs/macx-ios-clang/features/resolve_config.prf | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mkspecs') diff --git a/mkspecs/macx-ios-clang/features/resolve_config.prf b/mkspecs/macx-ios-clang/features/resolve_config.prf index 38d6c74ccb..c3ab90f45e 100644 --- a/mkspecs/macx-ios-clang/features/resolve_config.prf +++ b/mkspecs/macx-ios-clang/features/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: \ -- cgit v1.2.3 From a060d25ef2d71567d4057016d22f318ffda9dcf7 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 22 Apr 2016 20:05:53 +0200 Subject: add support for copying arbitrary files this adds file_copies.prf, which understands the variable COPIES, which works analogously to INSTALLS. i've been holding this off for a long time, as it is not without caveats. however, similar hacks are proliferating all over the code base, so it's time we formalized it. in fact, it's the easiest way to fix some nasty shadow build problems, which is why i'm adding this on the stable branch. Task-number: QTBUG-52256 Change-Id: Icbe3b9fbb79c952546aad2d467a438d3a69d749f Reviewed-by: Liang Qi Reviewed-by: Joerg Bornemann --- mkspecs/features/file_copies.prf | 41 ++++++++++++++++++++++++++++++++++++++++ mkspecs/features/spec_pre.prf | 2 +- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 mkspecs/features/file_copies.prf (limited to 'mkspecs') diff --git a/mkspecs/features/file_copies.prf b/mkspecs/features/file_copies.prf new file mode 100644 index 0000000000..f679129e03 --- /dev/null +++ b/mkspecs/features/file_copies.prf @@ -0,0 +1,41 @@ +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} + for (f, $${cp}.files): \ + $${pfx}.files += $$absolute_path($$f, $$_PRO_FILE_PWD_) + path = $$eval($${cp}.path) + isEmpty(path): error("COPY $cp defines no .path") + base = $$eval($${cp}.base) + isEmpty(base) { + $${pfx}.output = $$path/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT} + } 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 + $${pfx}.commands = $$QMAKE_COPY ${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/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 -- cgit v1.2.3 From f1958dbbead8843a96b1b59de59d8db340e0196b Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 22 Apr 2016 15:31:27 +0200 Subject: make use of COPIES Change-Id: I34965cada901fce3cf300a99fa65d4d3f9bd4578 Reviewed-by: Liang Qi Reviewed-by: Oswald Buddenhagen --- mkspecs/features/qml_module.prf | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qml_module.prf b/mkspecs/features/qml_module.prf index e71543e244..9e136a49f2 100644 --- a/mkspecs/features/qml_module.prf +++ b/mkspecs/features/qml_module.prf @@ -25,25 +25,10 @@ qml1_target: \ else: \ instbase = $$[QT_INSTALL_QML] -!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_)) - } - - qmlfiles2build.input = fq_qml_files - 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 -} - # Install rules qmldir.base = $$_PRO_FILE_PWD_ qmldir.files = $$fq_qml_files qmldir.path = $$instbase/$$TARGETPATH INSTALLS += qmldir + +!prefix_build: COPIES += qmldir -- cgit v1.2.3 From 6ebe7e8f37731a07ca7b1d5b8b93ccf73fb0273b Mon Sep 17 00:00:00 2001 From: Andreas Holzammer Date: Thu, 24 Mar 2016 08:01:58 +0100 Subject: mkspec: Add multiarch include folder to jetson tk1 device spec Under Windows, the default paths are not correctly set, hence it's necessary to explicitly set this. Change-Id: I9779485115a93bdaf6eb6be87293ca921746bae7 Reviewed-by: Oswald Buddenhagen Reviewed-by: Volker Krause Reviewed-by: Laszlo Agocs --- mkspecs/devices/linux-jetson-tk1-g++/qmake.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mkspecs') diff --git a/mkspecs/devices/linux-jetson-tk1-g++/qmake.conf b/mkspecs/devices/linux-jetson-tk1-g++/qmake.conf index 606ba9eca0..493b55384f 100644 --- a/mkspecs/devices/linux-jetson-tk1-g++/qmake.conf +++ b/mkspecs/devices/linux-jetson-tk1-g++/qmake.conf @@ -12,7 +12,8 @@ include(../common/linux_device_pre.conf) QMAKE_INCDIR += \ - $$[QT_SYSROOT]/usr/include + $$[QT_SYSROOT]/usr/include \ + $$[QT_SYSROOT]/usr/include/arm-linux-gnueabihf QMAKE_LIBDIR += \ $$[QT_SYSROOT]/usr/lib \ -- cgit v1.2.3 From c55bdc271fd4014f0bdb314840d89ceb02d6fc40 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 27 Apr 2016 13:42:22 +0200 Subject: don't apply warning options to host builds the host compiler's version is not determined, so we cannot make any assumptions about its capabilities. Task-number: QTBUG-53017 Change-Id: I939fd7402b5daac73f2195b9d8763b9008bc7ea4 Reviewed-by: Thiago Macieira Reviewed-by: Rolf Eike Beer --- mkspecs/features/qt_common.prf | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf index cc8ed87b90..de9ba9dde9 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() + warnings_are_errors:warning_clean { # If the module declares that it has does its clean-up of warnings, enable -Werror. # This setting is compiler-dependent anyway because it depends on the version of the -- cgit v1.2.3 From be6a92ec0920491a68e747b48154ad8712d97f4b Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 22 Apr 2016 20:20:47 +0200 Subject: remove redundant OTHER_FILES assignments newer versions of qt creator understand QMAKE_EXTRA_COMPILERS and INSTALLS, so there is no need to list the files twice. Change-Id: Iccf3cc3248daf3422b8c366c2eb2d2f46c5f08d1 Reviewed-by: Joerg Bornemann --- mkspecs/features/qml_module.prf | 3 --- 1 file changed, 3 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qml_module.prf b/mkspecs/features/qml_module.prf index 9e136a49f2..b09d42a0a4 100644 --- a/mkspecs/features/qml_module.prf +++ b/mkspecs/features/qml_module.prf @@ -17,9 +17,6 @@ fq_qml_files = $$_PRO_FILE_PWD_/qmldir 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: \ -- cgit v1.2.3 From 49f92f9ab75f5fcc086543d9dbcc025c37677715 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 29 Apr 2016 11:34:14 +0200 Subject: add some missing filename expandos to extra compilers - QMAKE_FILE_IN_EXT as an alias for QMAKE_FILE_EXT, for consistency with QMAKE_FILE_IN_BASE - QMAKE_FILE_IN_NAME to make pairing _EXT/_BASE to get a full name unnecessary (finally ...), and make use of it - QMAKE_FILE_OUT_PATH, because i'll need it Change-Id: I3d91ddb84f9cce52a665d562da11d165c92550c8 Reviewed-by: Joerg Bornemann --- mkspecs/features/file_copies.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mkspecs') diff --git a/mkspecs/features/file_copies.prf b/mkspecs/features/file_copies.prf index f679129e03..04a02258d5 100644 --- a/mkspecs/features/file_copies.prf +++ b/mkspecs/features/file_copies.prf @@ -24,7 +24,7 @@ for (cp, COPIES) { isEmpty(path): error("COPY $cp defines no .path") base = $$eval($${cp}.base) isEmpty(base) { - $${pfx}.output = $$path/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT} + $${pfx}.output = $$path/${QMAKE_FILE_IN_NAME} } else: isEqual(base, $$_PRO_FILE_PWD_) { $${pfx}.output = $$path/${QMAKE_FUNC_FILE_IN_qtStripProPwd} } else { -- cgit v1.2.3 From 8f0bf2d3d258acfae91e7dda2d1e7ad29b950c9b Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 29 Apr 2016 11:36:15 +0200 Subject: support directories in COPIES this makes it fully consistent with INSTALLS. note that this also removes the file name from the target path when copying files, also for consistency. Change-Id: I69042c9aa1e2cc81f8ff982343ba25688a04abfd Reviewed-by: Joerg Bornemann --- mkspecs/features/file_copies.prf | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/file_copies.prf b/mkspecs/features/file_copies.prf index 04a02258d5..6df294212c 100644 --- a/mkspecs/features/file_copies.prf +++ b/mkspecs/features/file_copies.prf @@ -18,10 +18,21 @@ defineReplace(qtStripProPwd) { for (cp, COPIES) { isEmpty($${cp}.files): next() pfx = copy_$${cp} - for (f, $${cp}.files): \ - $${pfx}.files += $$absolute_path($$f, $$_PRO_FILE_PWD_) + 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("COPY $cp defines no .path") + isEmpty(path): error("COPIES entry $$cp defines no .path") base = $$eval($${cp}.base) isEmpty(base) { $${pfx}.output = $$path/${QMAKE_FILE_IN_NAME} @@ -34,7 +45,12 @@ for (cp, COPIES) { $${pfx}.output = $$path/${QMAKE_FUNC_FILE_IN_qtStripSrcDir_$$cp} } $${pfx}.input = $${pfx}.files - $${pfx}.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} + !$$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} -- cgit v1.2.3 From e34ebe632825433d591165db737f732f741bbd9f Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 21 Apr 2016 20:02:20 +0200 Subject: automate the installation of some more example source files Change-Id: I61f9f4882c5a7743817059824250958f5ce4a603 Reviewed-by: Joerg Bornemann --- mkspecs/features/qt_example_installs.prf | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mkspecs') 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) \ -- cgit v1.2.3 From 52d30e2850769d589772576e4714a14241c7da6e Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Thu, 28 Apr 2016 12:45:32 +0200 Subject: Add device mkspec for the iMX7 SOC Right now there are no iMX7 SOCs available with OpenGL capable GPUs so the mkspec is very basic. Change-Id: Ia5c83eea72c4d436c774b2955ccd71f2256bfd6b Reviewed-by: Laszlo Agocs --- mkspecs/devices/linux-imx7-g++/qmake.conf | 17 +++++++++++ mkspecs/devices/linux-imx7-g++/qplatformdefs.h | 40 ++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 mkspecs/devices/linux-imx7-g++/qmake.conf create mode 100644 mkspecs/devices/linux-imx7-g++/qplatformdefs.h (limited to 'mkspecs') diff --git a/mkspecs/devices/linux-imx7-g++/qmake.conf b/mkspecs/devices/linux-imx7-g++/qmake.conf new file mode 100644 index 0000000000..04f7eeddd0 --- /dev/null +++ b/mkspecs/devices/linux-imx7-g++/qmake.conf @@ -0,0 +1,17 @@ +# +# qmake configuration for the NXP iMX7 boards (single, dual and quad) +# + +include(../common/linux_device_pre.conf) + +IMX7_CFLAGS = -march=armv7-a -mfpu=neon -DLINUX=1 +QMAKE_CFLAGS += $$IMX7_CFLAGS +QMAKE_CXXFLAGS += $$IMX7_CFLAGS + +DISTRO_OPTS += hard-float + +QT_QPA_DEFAULT_PLATFORM = linuxfb + +include(../common/linux_arm_device_post.conf) + +load(qt_config) diff --git a/mkspecs/devices/linux-imx7-g++/qplatformdefs.h b/mkspecs/devices/linux-imx7-g++/qplatformdefs.h new file mode 100644 index 0000000000..6a35ed45d5 --- /dev/null +++ b/mkspecs/devices/linux-imx7-g++/qplatformdefs.h @@ -0,0 +1,40 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "../../linux-g++/qplatformdefs.h" -- cgit v1.2.3 From ace5e5fc7b9215041093f6986e3ef4efd1de7cc0 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 11 Apr 2016 19:05:01 -0700 Subject: Add support for -Werror with ICC 17 on Linux Change-Id: Id75834dab9ed466e94c7ffff14447a58fe16617f Reviewed-by: Oswald Buddenhagen Reviewed-by: Thiago Macieira --- mkspecs/features/qt_common.prf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf index bc661f4dd7..b060ff604e 100644 --- a/mkspecs/features/qt_common.prf +++ b/mkspecs/features/qt_common.prf @@ -76,9 +76,9 @@ warnings_are_errors:warning_clean { 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 -- cgit v1.2.3