${TARGET} variable works differently for shared libraries.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2019-12-22 12:44:43 +02:00
parent 888a968056
commit 41c3ddf5db
2 changed files with 14 additions and 50 deletions

View File

@ -98,15 +98,8 @@ CONFIG(release, debug|release){
} else { } else {
!macx:!*msvc*{ !macx:!*msvc*{
noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols
win32{ # Strip debug symbols.
# Strip debug symbols. QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET}
QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET}
}
unix{
# Strip after you link all libaries.
QMAKE_POST_LINK += objcopy --strip-debug ${TARGET}
}
} else { } else {
# Turn on debug symbols in release mode on Unix systems. # Turn on debug symbols in release mode on Unix systems.
# On Mac OS X temporarily disabled. TODO: find way how to strip binary file. # 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_CFLAGS_RELEASE += -g -gdwarf-3
QMAKE_LFLAGS_RELEASE = QMAKE_LFLAGS_RELEASE =
win32{ # Strip debug symbols.
# Strip debug symbols. QMAKE_POST_LINK += objcopy --only-keep-debug bin/${TARGET} bin/${TARGET}.dbg &&
QMAKE_POST_LINK += objcopy --only-keep-debug bin/${TARGET} bin/${TARGET}.dbg && QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} &&
QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} && QMAKE_POST_LINK += objcopy --add-gnu-debuglink="bin/${TARGET}.dbg" bin/${TARGET}
QMAKE_POST_LINK += objcopy --add-gnu-debuglink="bin/${TARGET}.dbg" bin/${TARGET}
QMAKE_DISTCLEAN += bin/${TARGET}.dbg 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
}
} }
} }
} }

View File

@ -97,15 +97,8 @@ CONFIG(release, debug|release){
} else { } else {
!macx:!*msvc*{ !macx:!*msvc*{
noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols
win32{ # Strip debug symbols.
# Strip debug symbols. QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET}
QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET}
}
unix{
# Strip after you link all libaries.
QMAKE_POST_LINK += objcopy --strip-debug ${TARGET}
}
} else { } else {
# Turn on debug symbols in release mode on Unix systems. # Turn on debug symbols in release mode on Unix systems.
# On Mac OS X temporarily disabled. TODO: find way how to strip binary file. # 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_CFLAGS_RELEASE += -g -gdwarf-3
QMAKE_LFLAGS_RELEASE = QMAKE_LFLAGS_RELEASE =
win32{ # Strip debug symbols.
# Strip debug symbols. QMAKE_POST_LINK += objcopy --only-keep-debug bin/${TARGET} bin/${TARGET}.dbg &&
QMAKE_POST_LINK += objcopy --only-keep-debug bin/${TARGET} bin/${TARGET}.dbg && QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} &&
QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} && QMAKE_POST_LINK += objcopy --add-gnu-debuglink="bin/${TARGET}.dbg" bin/${TARGET}
QMAKE_POST_LINK += objcopy --add-gnu-debuglink="bin/${TARGET}.dbg" bin/${TARGET}
QMAKE_DISTCLEAN += bin/${TARGET}.dbg 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
}
} }
} }
} }