summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-01-11 12:12:11 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-01-12 12:18:36 +0000
commit7044409c878f100c005b76fc90717b4f71667f04 (patch)
tree20dca577258e501ac8ad66b283e06f0ff7fca285
parent911da982df662dfddbb087ca33af239574dd8132 (diff)
macOS: Use tool environment to ensure tests load matching Qt libraries
Linking with a framework suffix to pick up the debug version of libraries doesn't work as long as the dependencies picked up from prl files are not rewritten to also include the suffix. The result is that we end up loading both release and debug versions of the Qt libraries. Use the target environment (target_wrapper.sh) to set the image suffix instead, which means 'make check' will automatically work. Change-Id: I60b0840760f68e579c270245d394e1dd609a0ebb Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
-rw-r--r--mkspecs/features/qt.prf8
-rw-r--r--mkspecs/features/testcase.prf10
2 files changed, 7 insertions, 11 deletions
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
index 5da82fdb5b..d8d5acaafd 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -209,14 +209,6 @@ for(ever) {
!isEmpty(MODULE_MODULE) {
contains(MODULE_CONFIG, lib_bundle) {
framework = $$MODULE_MODULE
- qtConfig(debug_and_release):qt_link_suffixed_framework:!macx-xcode {
- platform_target_suffix = $$qtPlatformTargetSuffix()
- !isEmpty(platform_target_suffix): \
- # The -framework linker argument supports a name[,suffix] version,
- # where if the suffix is specified the framework is first searched
- # for the library with the suffix and then without.
- framework = $$framework,$$platform_target_suffix
- }
LIBS$$var_sfx += -framework $$framework
} else {
!isEmpty(MODULE_LIBS_ADD): \
diff --git a/mkspecs/features/testcase.prf b/mkspecs/features/testcase.prf
index bfc28c6861..b8102c26b5 100644
--- a/mkspecs/features/testcase.prf
+++ b/mkspecs/features/testcase.prf
@@ -21,15 +21,19 @@ testcase_lowdpi {
}
}
-# Make sure we explicitly link to the debug version of the Qt libraries if needed
-macos: CONFIG += qt_link_suffixed_framework
-
benchmark: type = benchmark
else: type = check
$${type}.files =
$${type}.path = .
+# Make sure we explicitly load the debug version of the Qt libraries if needed
+macos {
+ dyld_image_suffix.name = DYLD_IMAGE_SUFFIX
+ dyld_image_suffix.value = $$qtPlatformTargetSuffix()
+ QT_TOOL_ENV += dyld_image_suffix
+}
+
# Add environment for non-installed builds. Do this first, so the
# 'make' variable expansions don't end up in a batch file/script.
QT_TOOL_NAME = target