summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/win32
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-06-13 09:01:02 +0200
committerLiang Qi <liang.qi@qt.io>2016-06-13 12:46:46 +0200
commit511790fd1af1e2886a0e2e8dd4308099705cd815 (patch)
treeb42aee537a6103cd064f9f41ae2889b09b79fd23 /mkspecs/features/win32
parent1542d8881fc5ccbc5918cd4acbe4091ebbd24508 (diff)
parentcbe332405aa22257d432f1797b325f5e57007c20 (diff)
Merge remote-tracking branch 'origin/5.7' into dev
Conflicts: config_help.txt configure mkspecs/features/uikit/sdk.prf src/corelib/global/qhooks.cpp src/corelib/io/qfilesystemwatcher.cpp src/corelib/io/qlockfile_unix.cpp src/corelib/tools/qalgorithms.h src/gui/kernel/qwindowsysteminterface.h src/gui/text/qtextdocument_p.cpp src/network/access/access.pri src/network/access/qnetworkaccessmanager.cpp src/network/access/qnetworkreplynsurlconnectionimpl.mm src/src.pro src/testlib/qtestcase.cpp src/widgets/kernel/qwidgetbackingstore_p.h src/widgets/styles/qwindowscestyle.cpp src/widgets/styles/qwindowsmobilestyle.cpp tests/auto/corelib/io/qdiriterator/qdiriterator.pro tests/auto/corelib/io/qfileinfo/qfileinfo.pro tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp tools/configure/configureapp.cpp Change-Id: Ibf7fb9c8cf263a810ade82f821345d0725c57c67
Diffstat (limited to 'mkspecs/features/win32')
-rw-r--r--mkspecs/features/win32/separate_debug_info.prf18
1 files changed, 18 insertions, 0 deletions
diff --git a/mkspecs/features/win32/separate_debug_info.prf b/mkspecs/features/win32/separate_debug_info.prf
new file mode 100644
index 0000000000..2838020f01
--- /dev/null
+++ b/mkspecs/features/win32/separate_debug_info.prf
@@ -0,0 +1,18 @@
+have_target:!static:!isEmpty(QMAKE_OBJCOPY) {
+ load(resolve_target)
+ QMAKE_TARGET_DEBUG_INFO = $${QMAKE_RESOLVED_TARGET}.debug
+
+ 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 --only-keep-debug $$shell_target $$shell_target_debug_info
+ link_debug_info = $$QMAKE_OBJCOPY --add-gnu-debuglink=$$shell_target_debug_info $$shell_target
+ strip_debug_info = $$QMAKE_OBJCOPY --strip-debug $$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 $$QMAKE_POST_LINK
+ silent:QMAKE_POST_LINK = @echo creating $@.debug && $$QMAKE_POST_LINK
+
+ target.targets += $$QMAKE_TARGET_DEBUG_INFO
+ QMAKE_DISTCLEAN += $$QMAKE_TARGET_DEBUG_INFO
+}