From 41c3ddf5db511eb5dc1a117ca84bb655d1aad798 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sun, 22 Dec 2019 12:44:43 +0200 Subject: [PATCH] ${TARGET} variable works differently for shared libraries. --HG-- branch : develop --- src/libs/qmuparser/qmuparser.pro | 32 ++++--------------- .../vpropertyexplorer/vpropertyexplorer.pro | 32 ++++--------------- 2 files changed, 14 insertions(+), 50 deletions(-) diff --git a/src/libs/qmuparser/qmuparser.pro b/src/libs/qmuparser/qmuparser.pro index dc56c86d8..3ec0b161c 100644 --- a/src/libs/qmuparser/qmuparser.pro +++ b/src/libs/qmuparser/qmuparser.pro @@ -98,15 +98,8 @@ CONFIG(release, debug|release){ } else { !macx:!*msvc*{ noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols - win32{ - # Strip debug symbols. - QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} - } - - unix{ - # Strip after you link all libaries. - QMAKE_POST_LINK += objcopy --strip-debug ${TARGET} - } + # Strip debug symbols. + QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} } else { # Turn on debug symbols in release mode on Unix systems. # On Mac OS X temporarily disabled. TODO: find way how to strip binary file. @@ -114,23 +107,12 @@ CONFIG(release, debug|release){ QMAKE_CFLAGS_RELEASE += -g -gdwarf-3 QMAKE_LFLAGS_RELEASE = - win32{ - # Strip debug symbols. - QMAKE_POST_LINK += objcopy --only-keep-debug bin/${TARGET} bin/${TARGET}.dbg && - QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} && - QMAKE_POST_LINK += objcopy --add-gnu-debuglink="bin/${TARGET}.dbg" bin/${TARGET} + # Strip debug symbols. + QMAKE_POST_LINK += objcopy --only-keep-debug bin/${TARGET} bin/${TARGET}.dbg && + QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} && + QMAKE_POST_LINK += objcopy --add-gnu-debuglink="bin/${TARGET}.dbg" bin/${TARGET} - QMAKE_DISTCLEAN += bin/${TARGET}.dbg - } - - unix{ - # Strip debug symbols. - QMAKE_POST_LINK += objcopy --only-keep-debug ${TARGET} ${TARGET}.dbg && - QMAKE_POST_LINK += objcopy --strip-debug ${TARGET} && - QMAKE_POST_LINK += objcopy --add-gnu-debuglink="${TARGET}.dbg" ${TARGET} - - QMAKE_DISTCLEAN += ${TARGET}.dbg - } + QMAKE_DISTCLEAN += bin/${TARGET}.dbg } } } diff --git a/src/libs/vpropertyexplorer/vpropertyexplorer.pro b/src/libs/vpropertyexplorer/vpropertyexplorer.pro index ca3cd992b..54768e705 100644 --- a/src/libs/vpropertyexplorer/vpropertyexplorer.pro +++ b/src/libs/vpropertyexplorer/vpropertyexplorer.pro @@ -97,15 +97,8 @@ CONFIG(release, debug|release){ } else { !macx:!*msvc*{ noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols - win32{ - # Strip debug symbols. - QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} - } - - unix{ - # Strip after you link all libaries. - QMAKE_POST_LINK += objcopy --strip-debug ${TARGET} - } + # Strip debug symbols. + QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} } else { # Turn on debug symbols in release mode on Unix systems. # On Mac OS X temporarily disabled. TODO: find way how to strip binary file. @@ -113,23 +106,12 @@ CONFIG(release, debug|release){ QMAKE_CFLAGS_RELEASE += -g -gdwarf-3 QMAKE_LFLAGS_RELEASE = - win32{ - # Strip debug symbols. - QMAKE_POST_LINK += objcopy --only-keep-debug bin/${TARGET} bin/${TARGET}.dbg && - QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} && - QMAKE_POST_LINK += objcopy --add-gnu-debuglink="bin/${TARGET}.dbg" bin/${TARGET} + # Strip debug symbols. + QMAKE_POST_LINK += objcopy --only-keep-debug bin/${TARGET} bin/${TARGET}.dbg && + QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} && + QMAKE_POST_LINK += objcopy --add-gnu-debuglink="bin/${TARGET}.dbg" bin/${TARGET} - QMAKE_DISTCLEAN += bin/${TARGET}.dbg - } - - unix{ - # Strip debug symbols. - QMAKE_POST_LINK += objcopy --only-keep-debug ${TARGET} ${TARGET}.dbg && - QMAKE_POST_LINK += objcopy --strip-debug ${TARGET} && - QMAKE_POST_LINK += objcopy --add-gnu-debuglink="${TARGET}.dbg" ${TARGET} - - QMAKE_DISTCLEAN += ${TARGET}.dbg - } + QMAKE_DISTCLEAN += bin/${TARGET}.dbg } } }